diff --git a/apps/vaults-v3/components/details/RewardsTab.tsx b/apps/vaults-v3/components/details/RewardsTab.tsx index 42166ab4..b9753d68 100644 --- a/apps/vaults-v3/components/details/RewardsTab.tsx +++ b/apps/vaults-v3/components/details/RewardsTab.tsx @@ -1,9 +1,11 @@ import {useCallback, useMemo, useState} from 'react'; import {useRouter} from 'next/router'; +import {useReadContract} from 'wagmi'; import {useWeb3} from '@builtbymom/web3/contexts/useWeb3'; import {cl, formatAmount, formatCounterValue, isZero, toAddress, toBigInt} from '@builtbymom/web3/utils'; import {approveERC20, defaultTxStatus} from '@builtbymom/web3/utils/wagmi'; import {useVaultStakingData} from '@vaults/hooks/useVaultStakingData'; +import {VEYFI_GAUGE_ABI} from '@vaults/utils/abi/veYFIGauge.abi'; import { claim as claimAction, stake as stakeAction, @@ -156,6 +158,13 @@ export function RewardsTab(props: {currentVault: TYDaemonVault; hasStakingReward const [unstakeStatus, set_unstakeStatus] = useState(defaultTxStatus); const isApproved = vaultData.vaultAllowance.raw >= vaultData.vaultBalanceOf.raw; + const {data: symbol} = useReadContract({ + address: vaultData.address, + abi: VEYFI_GAUGE_ABI, + functionName: 'symbol', + chainId: props.currentVault.chainID + }); + /********************************************************************************************** ** The refreshData function will be called when the user interacts with the stake, unstake, or ** claim buttons. It will refresh the user's balances and the staking rewards data so the app @@ -345,17 +354,50 @@ export function RewardsTab(props: {currentVault: TYDaemonVault; hasStakingReward ) } /> +
{`${formatAmount(vaultData.stakedBalanceOf.normalized, 6)} ${symbol} staked`}
+{`${formatCounterValue(vaultData.stakedBalanceOf.normalized, vaultTokenPrice.normalized)}`}
+