From d216193ea7279fb5c4dfa680a3e1b8d26ced59df Mon Sep 17 00:00:00 2001 From: Jhonatan Gonzalez Date: Fri, 13 Sep 2024 13:37:53 +1000 Subject: [PATCH] [NO CHANGELOG][Balance Widget] fix: Use token icon if available (#2173) --- .../src/widgets/wallet/functions/tokenBalances.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/checkout/widgets-lib/src/widgets/wallet/functions/tokenBalances.ts b/packages/checkout/widgets-lib/src/widgets/wallet/functions/tokenBalances.ts index c9b74fc65b..93ab1a74cd 100644 --- a/packages/checkout/widgets-lib/src/widgets/wallet/functions/tokenBalances.ts +++ b/packages/checkout/widgets-lib/src/widgets/wallet/functions/tokenBalances.ts @@ -48,12 +48,14 @@ export const getTokenBalances = async ( ...balanceResult, token: { ...balanceResult.token, - icon: getTokenImageByAddress( - checkout.config.environment as Environment, - isNativeToken(balanceResult.token.address) - ? balanceResult.token.symbol - : balanceResult.token.address ?? '', - ), + icon: + balanceResult.token.icon + ?? getTokenImageByAddress( + checkout.config.environment as Environment, + isNativeToken(balanceResult.token.address) + ? balanceResult.token.symbol + : balanceResult.token.address ?? '', + ), }, }));