From ac9eed78105e38a698d427317354e9b1709d87fc Mon Sep 17 00:00:00 2001 From: plubber <51789398+ericHgorski@users.noreply.github.com> Date: Wed, 25 Dec 2024 19:57:39 -0500 Subject: [PATCH 1/3] fix: update wallet filtering logic and clean up unused variables in SwapExecutionPage --- packages/widget/src/components/RenderWalletList.tsx | 6 +++--- .../src/pages/SwapExecutionPage/SwapExecutionPage.tsx | 6 ++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/widget/src/components/RenderWalletList.tsx b/packages/widget/src/components/RenderWalletList.tsx index 1ad05752..1a739ed8 100644 --- a/packages/widget/src/components/RenderWalletList.tsx +++ b/packages/widget/src/components/RenderWalletList.tsx @@ -63,7 +63,7 @@ export const RenderWalletList = ({ const displayWallets = useMemo(() => { const filteredWallets = walletList.filter( - (wallet) => isMinimalWallet(wallet) && wallet?.isAvailable !== false + (wallet) => isManualWalletEntry(wallet) || wallet?.isAvailable !== false ); return filteredWallets.length === 1 ? walletList : filteredWallets; @@ -124,7 +124,7 @@ export const RenderWalletList = ({ const renderedRightContent = rightContent?.() ?? <>; - const imageElement = ( + const imageElement = imageUrl ? ( {`${name}-logo`} - ) + ) : null; const onClickConnectWallet = () => { if (isMinimalWallet(wallet)) { diff --git a/packages/widget/src/pages/SwapExecutionPage/SwapExecutionPage.tsx b/packages/widget/src/pages/SwapExecutionPage/SwapExecutionPage.tsx index 40e2774e..50fa3632 100644 --- a/packages/widget/src/pages/SwapExecutionPage/SwapExecutionPage.tsx +++ b/packages/widget/src/pages/SwapExecutionPage/SwapExecutionPage.tsx @@ -98,8 +98,6 @@ export const SwapExecutionPage = () => { }, [signaturesRemaining, shouldDisplaySignaturesRemaining]); const onClickEditDestinationWallet = useMemo(() => { - const lastIndex = chainAddresses ? Object.keys(chainAddresses).length - 1 : 0; - const destinationAddress = chainAddresses?.[lastIndex]?.address; const loadingStates = [ SwapExecutionState.pending, SwapExecutionState.waitingForSigning, @@ -107,7 +105,7 @@ export const SwapExecutionPage = () => { SwapExecutionState.confirmed ]; - if (loadingStates.includes(swapExecutionState) || !destinationAddress) { + if (loadingStates.includes(swapExecutionState)) { return undefined; } @@ -116,7 +114,7 @@ export const SwapExecutionPage = () => { chainId: route?.destAssetChainID, }); }; - }, [chainAddresses, swapExecutionState, route?.destAssetChainID]); + }, [swapExecutionState, route?.destAssetChainID]); From c74c20d2be5ef63b4a2138c227757e12ff09eeae Mon Sep 17 00:00:00 2001 From: plubber <51789398+ericHgorski@users.noreply.github.com> Date: Wed, 25 Dec 2024 19:59:02 -0500 Subject: [PATCH 2/3] changeset --- .changeset/short-seals-tap.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/short-seals-tap.md diff --git a/.changeset/short-seals-tap.md b/.changeset/short-seals-tap.md new file mode 100644 index 00000000..19833814 --- /dev/null +++ b/.changeset/short-seals-tap.md @@ -0,0 +1,5 @@ +--- +'@skip-go/widget': patch +--- + +fix edit desintation address From 8279351aa770bbc8d58b6f2f5aaa933f614c80d7 Mon Sep 17 00:00:00 2001 From: plubber <51789398+ericHgorski@users.noreply.github.com> Date: Wed, 25 Dec 2024 20:11:39 -0500 Subject: [PATCH 3/3] feat: add signaturesRemaining state to loading states in SwapExecutionPage --- .../widget/src/pages/SwapExecutionPage/SwapExecutionPage.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/widget/src/pages/SwapExecutionPage/SwapExecutionPage.tsx b/packages/widget/src/pages/SwapExecutionPage/SwapExecutionPage.tsx index 50fa3632..027d8a19 100644 --- a/packages/widget/src/pages/SwapExecutionPage/SwapExecutionPage.tsx +++ b/packages/widget/src/pages/SwapExecutionPage/SwapExecutionPage.tsx @@ -102,7 +102,8 @@ export const SwapExecutionPage = () => { SwapExecutionState.pending, SwapExecutionState.waitingForSigning, SwapExecutionState.validatingGasBalance, - SwapExecutionState.confirmed + SwapExecutionState.confirmed, + SwapExecutionState.signaturesRemaining, ]; if (loadingStates.includes(swapExecutionState)) {