diff --git a/apps/veyfi/components/RewardsTab.tsx b/apps/veyfi/components/RewardsTab.tsx index 1e41cbda1..b81d10bf7 100644 --- a/apps/veyfi/components/RewardsTab.tsx +++ b/apps/veyfi/components/RewardsTab.tsx @@ -103,7 +103,7 @@ function GaugeRewards(): ReactElement { } function BoostRewards(): ReactElement { - const {provider, address} = useWeb3(); + const {isActive, provider, address} = useWeb3(); const {dYFIPrice} = useOption(); const [claimable, set_claimable] = useState(toNormalizedBN(0)); const [claimStatus, set_claimStatus] = useState(defaultTxStatus); @@ -126,7 +126,7 @@ function BoostRewards(): ReactElement { console.warn(`[err - BoostRewards]: static call reverted when trying to get claimable amount.`); set_claimable(toNormalizedBN(0)); } - }, [address]); + }, [address, isActive, provider]); // eslint-disable-line react-hooks/exhaustive-deps const onClaim = useCallback(async (): Promise => { const result = await GaugeActions.claimBoostRewards({ @@ -173,7 +173,7 @@ function BoostRewards(): ReactElement { } function ExitRewards(): ReactElement { - const {provider, address} = useWeb3(); + const {isActive, provider, address} = useWeb3(); const yfiPrice = useTokenPrice(YFI_ADDRESS); const [claimable, set_claimable] = useState(toNormalizedBN(0)); const [claimStatus, set_claimStatus] = useState(defaultTxStatus); @@ -196,7 +196,7 @@ function ExitRewards(): ReactElement { console.error(`[err - ExitRewards]: static call reverted when trying to get claimable amount.`); set_claimable(toNormalizedBN(0)); } - }, [address]); + }, [address, isActive, provider]); // eslint-disable-line react-hooks/exhaustive-deps const onClaim = useCallback(async (): Promise => { const result = await GaugeActions.claimBoostRewards({