Skip to content

Fix bug when adding a Satochip key directly after importing a BIP39 seed#6907

Merged
cakesoft-vaibhav merged 3 commits intoKeeperCommunity:sprintfrom
Toporin:fix_satochip_import_seed_bug
Mar 30, 2026
Merged

Fix bug when adding a Satochip key directly after importing a BIP39 seed#6907
cakesoft-vaibhav merged 3 commits intoKeeperCommunity:sprintfrom
Toporin:fix_satochip_import_seed_bug

Conversation

@Toporin
Copy link
Copy Markdown
Contributor

@Toporin Toporin commented Mar 3, 2026

During testing, we noticed a bug when adding a Satochip key directly after importing a BIP39 seed via the 'Setup options'.

Console error message: SetupSatochip.tsx:226 Warning: TypeError: Cannot read property 'n' of undefined

Root cause: ImportSatochipSeed used CommonActions.navigate("EnterSeedScreen"),
which pops back to an existing EnterSeedScreen already below AddSigningDevice
in the stack, ejecting AddSigningDevice and SetupSatochip. When
SatochipSeedImportModal later navigated back to SatochipAction it created a
fresh instance with no original params, so scheme.n was undefined → crash.

Additionally, setupSatochipParams was passed into SatochipSeedImportModal but
never forwarded to SatochipAction on close, losing isMultisig/accountNumber/
signer context needed for the subsequent NFC signing step.

Changes:

  • ImportSatochipSeed: replace CommonActions.navigate → StackActions.push for
    EnterSeedScreen so a new instance is always pushed, preserving AddSigningDevice
    in the stack
  • SatochipSeedImportModal: extract setupSatochipParams from route.params and
    spread it into the SatochipAction return navigation so original SetupSatochip
    params are fully restored after seed import
  • (minor UI) improve user notification when authenticating a satochip card that is not setup

This PR has been tested and patches the issue.

Toporin added 2 commits March 3, 2026 13:18
This error happens when adding a Satochip signer directly after importing a BIP39 seed via the 'Setup options'

Error message: ```SetupSatochip.tsx:226 Warning: TypeError: Cannot read property 'n' of undefined```

Root cause: ImportSatochipSeed used CommonActions.navigate("EnterSeedScreen"),
which pops back to an existing EnterSeedScreen already below AddSigningDevice
in the stack, ejecting AddSigningDevice and SetupSatochip. When
SatochipSeedImportModal later navigated back to SatochipAction it created a
fresh instance with no original params, so scheme.n was undefined → crash.

Additionally, setupSatochipParams was passed into SatochipSeedImportModal but
never forwarded to SatochipAction on close, losing isMultisig/accountNumber/
signer context needed for the subsequent NFC signing step.

Changes:
- ImportSatochipSeed: replace CommonActions.navigate → StackActions.push for
  EnterSeedScreen so a new instance is always pushed, preserving AddSigningDevice
  in the stack
- SatochipSeedImportModal: extract setupSatochipParams from route.params and
  spread it into the SatochipAction return navigation so original SetupSatochip
  params are fully restored after seed import
When card is not setup, authenticity cannot be evaluated.
@cakesoft-vaibhav cakesoft-vaibhav merged commit f43fa9a into KeeperCommunity:sprint Mar 30, 2026
1 of 2 checks passed
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.

3 participants