diff --git a/apps/veyfi/components/RedeemTab.tsx b/apps/veyfi/components/RedeemTab.tsx index 75512a1f8..612a29cc8 100644 --- a/apps/veyfi/components/RedeemTab.tsx +++ b/apps/veyfi/components/RedeemTab.tsx @@ -108,7 +108,9 @@ export function RedeemTab(): ReactElement { '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.' }
- + {`Current discount: ${formatAmount(Number(discount.normalized) * 100, 2, 2)}%`} @@ -125,10 +127,14 @@ export function RedeemTab(): ReactElement { error={redeemAmountError} legend={+
{formatCounterValue(redeemAmount.normalized, dYFIPrice)}
-{`You have: ${formatAmount( +
{`You have: ${formatAmount( dYFIBalance.normalized, 2, 6 @@ -142,13 +148,17 @@ export function RedeemTab(): ReactElement { amount={ethRequired} legend={
+
{formatCounterValue( ethRequired.normalized, Number(ethBalance.price.normalized) ?? 0 )}
-{`You have: ${formatAmount( +
{`You have: ${formatAmount( ethBalance.balance.normalized, 2, 6 @@ -163,10 +173,14 @@ export function RedeemTab(): ReactElement { amount={redeemAmount} legend={
+
{formatCounterValue(redeemAmount.normalized, yfiPrice)}
-{`You have: ${formatAmount( +
{`You have: ${formatAmount(
yfiBalance.normalized,
2,
6
diff --git a/apps/veyfi/contexts/useGauge.tsx b/apps/veyfi/contexts/useGauge.tsx
index eab7b38f3..66e24403b 100644
--- a/apps/veyfi/contexts/useGauge.tsx
+++ b/apps/veyfi/contexts/useGauge.tsx
@@ -1,4 +1,4 @@
-import React, {createContext, memo, useContext, useState} from 'react';
+import React, {createContext, memo, useCallback, useContext, useState} from 'react';
import {FixedNumber} from 'ethers';
import {useDeepCompareMemo} from '@react-hookz/web';
import {VEYFI_GAUGE_ABI} from '@veYFI/utils/abi/veYFIGauge.abi';
@@ -145,7 +145,7 @@ export const GaugeContextApp = memo(function GaugeContextApp({children}: {childr
set_positionsMap(allPositionsAsMap);
}, [address, gauges, isActive]);
- const refresh = useAsyncTrigger(async (): Promise{'veYFI'}