diff --git a/web/src/components/WithdrawCard/WithdrawCard.tsx b/web/src/components/WithdrawCard/WithdrawCard.tsx index c447311..6830753 100644 --- a/web/src/components/WithdrawCard/WithdrawCard.tsx +++ b/web/src/components/WithdrawCard/WithdrawCard.tsx @@ -326,11 +326,13 @@ export default function WithdrawCard(): React.ReactElement { Address: {fromAddress}

)} - {fromAddress && selectedEvmCurrency && !isLoadingSelectedEvmCurrencyBalance && ( -

- Balance: {selectedEvmCurrencyBalance} -

- )} + {fromAddress && + selectedEvmCurrency && + !isLoadingSelectedEvmCurrencyBalance && ( +

+ Balance: {selectedEvmCurrencyBalance} +

+ )} {fromAddress && isLoadingSelectedEvmCurrencyBalance && (

Balance: diff --git a/web/src/features/EvmWallet/contexts/EvmWalletContext.tsx b/web/src/features/EvmWallet/contexts/EvmWalletContext.tsx index a57e800..3ebca90 100644 --- a/web/src/features/EvmWallet/contexts/EvmWalletContext.tsx +++ b/web/src/features/EvmWallet/contexts/EvmWalletContext.tsx @@ -57,7 +57,11 @@ export const EvmWalletProvider: React.FC = ({ const wagmiConfig = useConfig(); const userAccount = useAccount(); - const { status: nativeBalanceStatus, data: nativeBalance, isLoading: isLoadingEvmNativeTokenBalance } = useBalance({ + const { + status: nativeBalanceStatus, + data: nativeBalance, + isLoading: isLoadingEvmNativeTokenBalance, + } = useBalance({ address: userAccount.address, }); @@ -144,8 +148,10 @@ export const EvmWalletProvider: React.FC = ({ }), [selectedEvmChain, selectedEvmCurrency], ); - const { balance: selectedEvmCurrencyBalance, isLoading: isLoadingSelectedEvmCurrencyBalance } = - useBalancePolling(getBalanceCallback, pollingConfig); + const { + balance: selectedEvmCurrencyBalance, + isLoading: isLoadingSelectedEvmCurrencyBalance, + } = useBalancePolling(getBalanceCallback, pollingConfig); const selectedEvmChainNativeToken = useMemo(() => { return selectedEvmChain?.currencies[0];