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 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..027d8a19 100644 --- a/packages/widget/src/pages/SwapExecutionPage/SwapExecutionPage.tsx +++ b/packages/widget/src/pages/SwapExecutionPage/SwapExecutionPage.tsx @@ -98,16 +98,15 @@ 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, SwapExecutionState.validatingGasBalance, - SwapExecutionState.confirmed + SwapExecutionState.confirmed, + SwapExecutionState.signaturesRemaining, ]; - if (loadingStates.includes(swapExecutionState) || !destinationAddress) { + if (loadingStates.includes(swapExecutionState)) { return undefined; } @@ -116,7 +115,7 @@ export const SwapExecutionPage = () => { chainId: route?.destAssetChainID, }); }; - }, [chainAddresses, swapExecutionState, route?.destAssetChainID]); + }, [swapExecutionState, route?.destAssetChainID]);