Skip to content

Commit

Permalink
fix: data not updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Majorfi committed Oct 19, 2023
1 parent 0bdb7c0 commit 98f9f1c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = {
'react/jsx-max-props-per-line': 'off',
'react-hooks/exhaustive-deps': [
'warn', {
'additionalHooks': '^useAsyncTrigger$'
'additionalHooks': '(^useAsyncTrigger$|^useDeepCompareMemo$)'
}
]
}
Expand Down
14 changes: 7 additions & 7 deletions apps/veyfi/components/RedeemTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export function RedeemTab(): ReactElement {
<p className={'w-2/3 whitespace-break-spaces'}>
{'Got dYFI, want YFI? You’ve come to the right place. Redeem dYFI for YFI by paying the redemption cost in ETH. Enjoy your cheap YFI anon.'}
</p>
<b className={'mt-4 block'}>
<b className={'mt-4 block'} suppressHydrationWarning>
{`Current discount: ${formatAmount(Number(discount.normalized) * 100, 2, 2)}%`}
</b>
</div>
Expand All @@ -128,8 +128,8 @@ export function RedeemTab(): ReactElement {
error={redeemAmountError}
legend={
<div className={'flex flex-row justify-between'}>
<p className={'text-neutral-400'}>{formatCounterValue(redeemAmount.normalized, dYFIPrice)}</p>
<p className={'text-neutral-400'}>{`You have: ${formatAmount(dYFIBalance.normalized, 2, 6)} dYFI`}</p>
<p className={'text-neutral-400'} suppressHydrationWarning>{formatCounterValue(redeemAmount.normalized, dYFIPrice)}</p>
<p className={'text-neutral-400'} suppressHydrationWarning>{`You have: ${formatAmount(dYFIBalance.normalized, 2, 6)} dYFI`}</p>
</div>
}
/>
Expand All @@ -139,8 +139,8 @@ export function RedeemTab(): ReactElement {
amount={ethRequired}
legend={
<div className={'flex flex-row justify-between'}>
<p className={'text-neutral-400'}>{formatCounterValue(ethRequired.normalized, ethBalance.normalizedPrice ?? 0)}</p>
<p className={'text-neutral-400'}>{`You have: ${formatAmount(ethBalance.normalized, 2, 6)} ETH`}</p>
<p className={'text-neutral-400'} suppressHydrationWarning>{formatCounterValue(ethRequired.normalized, ethBalance.normalizedPrice ?? 0)}</p>
<p className={'text-neutral-400'} suppressHydrationWarning>{`You have: ${formatAmount(ethBalance.normalized, 2, 6)} ETH`}</p>
</div>
}
disabled
Expand All @@ -151,8 +151,8 @@ export function RedeemTab(): ReactElement {
amount={redeemAmount}
legend={
<div className={'flex flex-row justify-between'}>
<p className={'text-neutral-400'}>{formatCounterValue(redeemAmount.normalized, yfiPrice)}</p>
<p className={'text-neutral-400'}>{`You have: ${formatAmount(yfiBalance.normalized, 2, 6)} YFI`}</p>
<p className={'text-neutral-400'} suppressHydrationWarning>{formatCounterValue(redeemAmount.normalized, yfiPrice)}</p>
<p className={'text-neutral-400'} suppressHydrationWarning>{`You have: ${formatAmount(yfiBalance.normalized, 2, 6)} YFI`}</p>
</div>
}
disabled
Expand Down
4 changes: 2 additions & 2 deletions apps/veyfi/components/ViewStakeUnstakeGauges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function StakeUnstakeButtons({vaultAddress, gaugeAddress, vaultDeposited, gaugeS
}

export function StakeUnstakeGauges(): ReactElement {
const {isActive, address} = useWeb3();
const {isActive} = useWeb3();
const {gaugesMap, positionsMap} = useGauge();
const {vaults, prices} = useYearn();
const {balances} = useWallet();
Expand Down Expand Up @@ -180,7 +180,7 @@ export function StakeUnstakeGauges(): ReactElement {
}
set_isLoadingGauges(false);
return data;
}, [gaugesMap, vaults, balances, positionsMap, address]);
}, [gaugesMap, vaults, prices, positionsMap, dYFIPrice, balances]);

const searchedGaugesData = useMemo((): TGaugeData[] => {
if (!search) {
Expand Down

1 comment on commit 98f9f1c

@vercel
Copy link

@vercel vercel bot commented on 98f9f1c Oct 19, 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.