From 643ea4cefbb4944f932e2ae3e0b2129bebb55415 Mon Sep 17 00:00:00 2001 From: Todd Kao Date: Thu, 26 Sep 2024 11:47:30 -0400 Subject: [PATCH] Fix not returning Connect Wallet Button if no sourceAccount found (#278) --- .../widget-v2/src/pages/SwapPage/SwapPage.tsx | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/packages/widget-v2/src/pages/SwapPage/SwapPage.tsx b/packages/widget-v2/src/pages/SwapPage/SwapPage.tsx index 71336017..e627be62 100644 --- a/packages/widget-v2/src/pages/SwapPage/SwapPage.tsx +++ b/packages/widget-v2/src/pages/SwapPage/SwapPage.tsx @@ -221,18 +221,19 @@ export const SwapPage = () => { if (isRouteError) { return ; } - if (!sourceAccount?.address) { - { - selectWalletmodal.show({ - chainId: sourceAsset?.chainID, - }); - }} - />; + return ( + { + selectWalletmodal.show({ + chainId: sourceAsset?.chainID, + }); + }} + /> + ); } if (insufficientBalance) { return (