Skip to content

Jon/fix/token toggling#5925

Open
Jon-edge wants to merge 5 commits intodevelopfrom
jon/fix/token-toggling
Open

Jon/fix/token toggling#5925
Jon-edge wants to merge 5 commits intodevelopfrom
jon/fix/token-toggling

Conversation

@Jon-edge
Copy link
Collaborator

@Jon-edge Jon-edge commented Feb 4, 2026

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)

Note

Medium Risk
Changes token-enable persistence semantics and back-navigation behavior; mistakes could lead to lost or unintended token enable/disable states and user confusion if edge cases (external updates, modal flows) aren’t handled correctly.

Overview
Token enable/disable toggles in ManageTokensScene no longer write through to the wallet immediately; changes are now kept in local pending state and only persisted via an explicit Save action.

Adds unsaved-change detection with a back-navigation interceptor that prompts users to Save or Discard, disables the Save button when nothing changed, and keeps token list ordering stable during a session while still incorporating externally-enabled tokens into the baseline.

Updates ManageTokensRow to become a pure row that delegates toggling to the scene and removes the prior pending/spinner animation and immediate changeEnabledTokenIds side effects; token-term approval now returns a boolean and is used to gate enabling.

Written by Cursor Bugbot for commit ad2ff55. This will update automatically on new commits. Configure here.


- Use React.FC pattern for component definition
- Add explicit null check for strict boolean expression
- Add return type to keyExtractor
Capture initial enabled state on mount and use it for sorting to
prevent the token list from re-ordering when tokens are toggled.
Use React.FC pattern for component definition.
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 209efc02d4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Jon-edge Jon-edge force-pushed the jon/fix/token-toggling branch from 209efc0 to ad2ff55 Compare February 4, 2026 18:41
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Remove live wallet updates and spinner animation. The row now
accepts an onToggle callback to update local state, deferring
the wallet update until explicit save. Token terms approval
still happens on toggle when enabling.
Replace live token toggling with local state that saves on explicit
button press. Changes include:

- Track pending changes locally until save
- Save button disabled when no changes, shows spinner while saving
- Prompt to save/discard when navigating back with unsaved changes
- Sync newly-added custom tokens into pending state
- Log token enable/disable activity on save
@Jon-edge Jon-edge force-pushed the jon/fix/token-toggling branch from ad2ff55 to a5e0ada Compare February 4, 2026 20:05
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