Skip to content

Commit

Permalink
fix: reward not reloaded
Browse files Browse the repository at this point in the history
  • Loading branch information
Majorfi committed Nov 4, 2023
1 parent 03e6384 commit 992bb98
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/veyfi/components/RewardsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<TNormalizedBN>(toNormalizedBN(0));
const [claimStatus, set_claimStatus] = useState(defaultTxStatus);
Expand All @@ -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<void> => {
const result = await GaugeActions.claimBoostRewards({
Expand Down Expand Up @@ -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<TNormalizedBN>(toNormalizedBN(0));
const [claimStatus, set_claimStatus] = useState(defaultTxStatus);
Expand All @@ -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<void> => {
const result = await GaugeActions.claimBoostRewards({
Expand Down

1 comment on commit 992bb98

@vercel
Copy link

@vercel vercel bot commented on 992bb98 Nov 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.