Skip to content

Commit

Permalink
Merge pull request #39 from CaliberVB/feature/holesky-testnet
Browse files Browse the repository at this point in the history
fixed display balance donate
  • Loading branch information
Dung1312091 authored Oct 4, 2023
2 parents f2ccdf6 + 81f0334 commit 9d92de8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/web/containers/Donate/Evm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ export const EvmDonate = () => {
const { alertState, onError, onSuccess } = useAlert();

const accountBalance = useEtherBalance(account, { refresh: 'everyBlock', chainId: networkChain.chainId });
const { doveFaucetBalance } = useDoveBalance();
const { holeskyFaucetBalance } = useHoleskyBalance();
const { doveBalance } = useDoveBalance();
const { holeskyBalance } = useHoleskyBalance();

const accountBalanceStr = accountBalance && formatEther(accountBalance);
let balanceDisplay = accountBalanceStr;
if (networkChain.name === 'dove') balanceDisplay = doveFaucetBalance;
if (networkChain.name === 'dove') balanceDisplay = formatEther(doveBalance || 0);

if (networkChain.name === 'holesky') balanceDisplay = holeskyFaucetBalance;
if (networkChain.name === 'holesky') balanceDisplay = formatEther(holeskyBalance || 0);
useEffect(() => {
onSetWalletAmount(balanceDisplay);
}, [balanceDisplay, onSetWalletAmount]);
Expand Down

0 comments on commit 9d92de8

Please sign in to comment.