Open
Conversation
Contributor
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
|
Contributor
Builds ready [0d9bad2]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 12 warn · 🔴 0 fail)
Bundle size diffs [🚀 Bundle size reduced!]
|
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.



Description
When importing an SRP, the toast message briefly shows "Wallet 1 imported" before updating to the correct number (e.g. "Wallet 2 imported"). This happens because background state updates are debounced (200ms, max 1s), so
hdKeyrings.lengthis stale when the toast first renders.showNewSrpAddedToastfrom abooleantonumber | false, storing the wallet number directlyhdKeyrings.length + 1before the import and passes it to the toast statesetShowNewSrpAddedToastdispatch fromimportMnemonicToVaultChangelog
CHANGELOG entry: Fixed a bug that was causing the wallet imported toast to momentarily show the wrong wallet added.
Related issues
Fixes #40944
Manual testing steps
Screenshots/Recordings
Before
See issue: #40944
After
Screen.Recording.2026-04-10.at.3.55.22.PM.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Changes the Redux
appState.showNewSrpAddedToasttype from boolean tonumber | falseand updates dispatch/selector usage; any remaining call sites assuming a boolean could break or hide the toast incorrectly.Overview
Fixes the “New SRP Added” toast briefly showing the wrong wallet number after importing an SRP by storing the wallet number in Redux instead of a boolean.
selectNewSrpAdded/setShowNewSrpAddedToastnow usenumber | false, the import flow dispatches the computed next wallet number (hdKeyrings.length + 1), andToastMasterrenders the message directly from that stored number. A redundantsetShowNewSrpAddedToast(true)dispatch insideimportMnemonicToVaultwas removed, and related unit tests were updated.Reviewed by Cursor Bugbot for commit 0d9bad2. Bugbot is set up for automated code reviews on this repo. Configure here.