diff --git a/client/src/ui/components/Balance.tsx b/client/src/ui/components/Balance.tsx index 31ead3a..19978b2 100644 --- a/client/src/ui/components/Balance.tsx +++ b/client/src/ui/components/Balance.tsx @@ -62,10 +62,17 @@ const Balance = ({ address, token_address, symbol = "ETH" }: BalanceProps) => { } }, [isError, error]); + const symbolImage = symbolImages[symbol]; + if (isError || !data) { return (
- 0 {symbol} + 0 + {symbolImage ? ( + {symbol} + ) : ( + {symbol} + )}
); } @@ -91,8 +98,6 @@ const Balance = ({ address, token_address, symbol = "ETH" }: BalanceProps) => { // Split the balance string into characters const balanceChars = balanceString.split(""); - const symbolImage = symbolImages[symbol]; - return (
{balanceChars.map((char, index) => (