From d81c9a360392d71fad13d0118889feaad22683c3 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sat, 6 Sep 2025 07:11:52 +0000
Subject: [PATCH 1/5] Initial plan
From f36c32f89158acac3164cc1421c9df17e48eca31 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sat, 6 Sep 2025 07:58:31 +0000
Subject: [PATCH 2/5] Implement unified token selection modal with custom
address support
Co-authored-by: hardyjosh <1190022+hardyjosh@users.noreply.github.com>
---
.../components/deployment/SelectToken.svelte | 82 +-----------
.../deployment/TokenSelectionModal.svelte | 122 +++++++++++++++++-
2 files changed, 118 insertions(+), 86 deletions(-)
diff --git a/packages/ui-components/src/lib/components/deployment/SelectToken.svelte b/packages/ui-components/src/lib/components/deployment/SelectToken.svelte
index 068f9faabe..f1fab6ef72 100644
--- a/packages/ui-components/src/lib/components/deployment/SelectToken.svelte
+++ b/packages/ui-components/src/lib/components/deployment/SelectToken.svelte
@@ -1,11 +1,9 @@
@@ -136,36 +89,7 @@
{/if}
-
- setMode('dropdown')}
- dataTestId="dropdown-mode-button"
- />
- setMode('custom')}
- dataTestId="custom-mode-button"
- />
-
-
- {#if selectionMode === 'dropdown'}
-
- {/if}
-
- {#if selectionMode === 'custom'}
-
-
-
- {/if}
+
{#if checking}
diff --git a/packages/ui-components/src/lib/components/deployment/TokenSelectionModal.svelte b/packages/ui-components/src/lib/components/deployment/TokenSelectionModal.svelte
index 91cd2c2d30..336d9453dd 100644
--- a/packages/ui-components/src/lib/components/deployment/TokenSelectionModal.svelte
+++ b/packages/ui-components/src/lib/components/deployment/TokenSelectionModal.svelte
@@ -1,6 +1,6 @@
@@ -83,7 +152,7 @@
- {#if isSearching}
+ {#if isSearching || isValidatingCustomToken}
-
Searching tokens...
+
{isValidatingCustomToken ? 'Validating token...' : 'Searching tokens...'}
{:else}
+
+ {#if customToken}
+
handleTokenSelect(customToken)}
+ on:keydown={(e) => e.key === 'Enter' && handleTokenSelect(customToken)}
+ role="button"
+ tabindex="0"
+ >
+
+
+ {customToken.name}
+
+
+ {customToken.symbol}
+ {formatAddress(customToken.address)}
+
+
+
+ Custom token (not in list)
+
+
+ {#if selectedToken?.address === customToken.address}
+
+ {/if}
+
+ {/if}
+
+
+ {#if customTokenError}
+
+
+
+ {customTokenError}
+
+
+ {/if}
+
+
{#each tokens as token (token.address)}
{/each}
- {#if tokens.length === 0}
+ {#if tokens.length === 0 && !customToken && !customTokenError && !isValidAddress(searchQuery)}
No tokens found matching your search.