Conversation
- 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.
There was a problem hiding this comment.
💡 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".
209efc0 to
ad2ff55
Compare
There was a problem hiding this comment.
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
ad2ff55 to
a5e0ada
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
noneRequirements
If you have made any visual changes to the GUI. Make sure you have:
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
ManageTokensSceneno 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
ManageTokensRowto become a pure row that delegates toggling to the scene and removes the prior pending/spinner animation and immediatechangeEnabledTokenIdsside 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.