fix: tracked tokens are kept per network, and bundled picks are offered on mainnet only (closes #523)
A network switch puts the outgoing network's tracked tokens away in a new persisted field, networkTrackedTokens, and brings back the incoming network's list, or an empty one, as endpoints are kept; the background's switch uses the same function. The two add-token screens offer their common-token picks on Ethereum Mainnet only. After a switch in Settings, Back renders the screen it lands on again, and the stack is cut at the first screen that cannot be rendered from saved state, or at AddressToken for any token but the native one; the cut stack is saved with the switch. ConfirmTx drawn again keeps the network it was reviewed on. A contract lookup that answers after a switch adds nothing. Model: opus-5-5
This commit was merged in pull request #572.
This commit is contained in:
+31
-28
@@ -852,7 +852,7 @@
|
||||
id="add-token-info"
|
||||
class="text-xs text-muted mb-2 min-h-[1.25rem] invisible"
|
||||
></div>
|
||||
<div class="mb-2">
|
||||
<div id="add-token-common" class="mb-2">
|
||||
<label class="block mb-1 text-xs text-muted"
|
||||
>Or pick a common token:</label
|
||||
>
|
||||
@@ -1336,36 +1336,39 @@
|
||||
<h2 class="font-bold mb-2">Add Token</h2>
|
||||
<p class="text-xs text-muted mb-3">
|
||||
Pick a common token or enter a contract address manually.
|
||||
Common tokens are offered on Ethereum Mainnet only.
|
||||
</p>
|
||||
|
||||
<!-- top 10 quick-pick buttons -->
|
||||
<div class="mb-3">
|
||||
<label class="block mb-1 text-xs text-muted"
|
||||
>Top tokens:</label
|
||||
>
|
||||
<div
|
||||
id="settings-addtoken-top10"
|
||||
class="flex flex-wrap gap-1"
|
||||
></div>
|
||||
</div>
|
||||
<div id="settings-addtoken-common">
|
||||
<!-- top 10 quick-pick buttons -->
|
||||
<div class="mb-3">
|
||||
<label class="block mb-1 text-xs text-muted"
|
||||
>Top tokens:</label
|
||||
>
|
||||
<div
|
||||
id="settings-addtoken-top10"
|
||||
class="flex flex-wrap gap-1"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<!-- top 100 dropdown -->
|
||||
<div class="mb-3">
|
||||
<label class="block mb-1 text-xs text-muted"
|
||||
>Or pick from top 100:</label
|
||||
>
|
||||
<select
|
||||
id="settings-addtoken-select"
|
||||
class="border border-border p-1 w-full font-mono text-sm bg-bg text-fg"
|
||||
>
|
||||
<option value="">-- select --</option>
|
||||
</select>
|
||||
<button
|
||||
id="btn-settings-addtoken-select"
|
||||
class="border border-border px-2 py-1 mt-1 hover:bg-fg hover:text-bg cursor-pointer"
|
||||
>
|
||||
Add selected
|
||||
</button>
|
||||
<!-- top 100 dropdown -->
|
||||
<div class="mb-3">
|
||||
<label class="block mb-1 text-xs text-muted"
|
||||
>Or pick from top 100:</label
|
||||
>
|
||||
<select
|
||||
id="settings-addtoken-select"
|
||||
class="border border-border p-1 w-full font-mono text-sm bg-bg text-fg"
|
||||
>
|
||||
<option value="">-- select --</option>
|
||||
</select>
|
||||
<button
|
||||
id="btn-settings-addtoken-select"
|
||||
class="border border-border px-2 py-1 mt-1 hover:bg-fg hover:text-bg cursor-pointer"
|
||||
>
|
||||
Add selected
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- manual contract address -->
|
||||
|
||||
Reference in New Issue
Block a user