diff --git a/src/packages/v2v3/components/V2V3Project/ProjectDashboard/hooks/useUnclaimedTokenBalance.ts b/src/packages/v2v3/components/V2V3Project/ProjectDashboard/hooks/useUnclaimedTokenBalance.ts index edfec86d9d..9ae20bbdf5 100644 --- a/src/packages/v2v3/components/V2V3Project/ProjectDashboard/hooks/useUnclaimedTokenBalance.ts +++ b/src/packages/v2v3/components/V2V3Project/ProjectDashboard/hooks/useUnclaimedTokenBalance.ts @@ -12,12 +12,13 @@ export const useUnclaimedTokenBalance = () => { const { data: claimedBalance } = useERC20BalanceOf(tokenAddress, userAddress) const { data: totalBalance } = useTotalBalanceOf(userAddress, projectId) - if ( - typeof claimedBalance === 'undefined' || - typeof totalBalance === 'undefined' - ) { + if (typeof totalBalance === 'undefined') { return undefined } + if (typeof claimedBalance === 'undefined') { + return totalBalance + } + return totalBalance.sub(claimedBalance) } diff --git a/src/packages/v2v3/components/V2V3Project/ProjectDashboard/hooks/useYourBalanceMenuItems/useBalanceMenuItemsUserFlags.ts b/src/packages/v2v3/components/V2V3Project/ProjectDashboard/hooks/useYourBalanceMenuItems/useBalanceMenuItemsUserFlags.ts index 5d315a4305..48653d41db 100644 --- a/src/packages/v2v3/components/V2V3Project/ProjectDashboard/hooks/useYourBalanceMenuItems/useBalanceMenuItemsUserFlags.ts +++ b/src/packages/v2v3/components/V2V3Project/ProjectDashboard/hooks/useYourBalanceMenuItems/useBalanceMenuItemsUserFlags.ts @@ -47,8 +47,11 @@ export const useBalanceMenuItemsUserFlags = () => { ) const canTransferTokens = useMemo( - () => !!unclaimedTokenBalance?.gt(0) || isDev, - [unclaimedTokenBalance, isDev], + () => + (!!unclaimedTokenBalance?.gt(0) && + !fundingCycleMetadata?.global.pauseTransfers) || + isDev, + [unclaimedTokenBalance, fundingCycleMetadata?.global.pauseTransfers, isDev], ) return {