Skip to content

Apply custom token additions on Manage Tokens save - #6169

Open
j0ntz wants to merge 4 commits into
developfrom
jon/manage-tokens-custom-add
Open

Apply custom token additions on Manage Tokens save#6169
j0ntz wants to merge 4 commits into
developfrom
jon/manage-tokens-custom-add

Conversation

@j0ntz

@j0ntz j0ntz commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Description

Adding a custom token from Manage Tokens left the screen in two wrong states:
the outer Save stayed greyed out unless a default token had also been toggled,
and the new token did not join the enabled tokens at the top of the list. It was
only findable by searching for it by name.

Both came from the deferred-save state added in "Add deferred save to
ManageTokensScene":

  • The effect that syncs externally-enabled tokens added the new token to
    pendingEnabledTokenIds and to baselineSet, so the addition never
    counted as an unsaved change and the Save button stayed disabled.
  • sortingBaselineSet was a useMemo with empty deps, frozen at mount, so a
    token that appeared later sorted with the disabled tokens.

The fix defers the enable to the Manage Tokens Save button, which is what the
task asks for:

  • EditTokenScene takes a deferEnable param. When set, and only for a
    brand-new custom token, it creates the token and leaves the enable to the
    caller. The other entry points (wallet list, scan, create-wallet) do not pass
    it and keep enabling immediately.
  • ManageTokensScene passes deferEnable, spots the new custom token id, and
    puts it in the pending set and the sorting baseline. The outer Save then
    applies it, and it renders with the enabled tokens at the top.
  • Tokens enabled from outside the scene now also join the sorting baseline, so
    they show up at the top too instead of only through a name search.

testIDs were added to the wallet list rows and the Manage Tokens rows so the
maestro flow could target them; the wallet rows had no stable selector and their
accessibility strings are whole-row concatenations.

Asana: https://app.asana.com/0/1215088146871429/1217694458639427

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

@j0ntz

j0ntz commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

📸 Test evidence (iOS sim, maestro)

manage tokens before

manage tokens before

add token edg

add token edg

new token enabled save active

new token enabled save active

saved back on assets

saved back on assets

persisted after save

persisted after save

Captured by the agent's in-app test run (build-and-test).

@j0ntz
j0ntz marked this pull request as ready for review August 21, 2026 05:03
@j0ntz
j0ntz force-pushed the jon/manage-tokens-custom-add branch from ef6b5a1 to d07fc19 Compare August 21, 2026 05:03
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant