From 1334a2de24217c8d13310dbffb1363a18dfa6a88 Mon Sep 17 00:00:00 2001 From: Jaco Date: Wed, 26 Jan 2022 12:05:59 +0100 Subject: [PATCH] Ignore bounty isProposed in treasury calcs (#6885) --- packages/react-hooks/src/useTreasury.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-hooks/src/useTreasury.ts b/packages/react-hooks/src/useTreasury.ts index 0656662c1d..be1a8570e1 100644 --- a/packages/react-hooks/src/useTreasury.ts +++ b/packages/react-hooks/src/useTreasury.ts @@ -76,8 +76,8 @@ function useTreasuryImpl (): Result { bounties && setResult((prev) => ({ ...prev, - pendingBounties: bounties.reduce((total, { bounty: { value } }) => - total.iadd(value), new BN(0) + pendingBounties: bounties.reduce((total, { bounty: { status, value } }) => + total.iadd(status.isProposed ? BN_ZERO : value), new BN(0) ) })); }, [bounties]);