Skip to content

Move import options into import private key scene#5982

Open
peachbits wants to merge 3 commits intodevelopfrom
matthew/move-import-options
Open

Move import options into import private key scene#5982
peachbits wants to merge 3 commits intodevelopfrom
matthew/move-import-options

Conversation

@peachbits
Copy link
Contributor

@peachbits peachbits commented Mar 17, 2026

The current import key scene calls importKey without any options as a test. This isn't ideal for plugins that do import options validations in that function. Some plugins fake it or have workarounds for missing options.

Included are some unrelated fixes for warnings seen while debugging.

  • fix cyclical imports across fantom stake plugins
  • fix brand new fallback staking object on each render

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 the wallet import flow by collecting and passing plugin-specific keyOptions into importKey and wallet creation, which could affect imports for multiple currencies if validation/option handling differs. Also touches staking plugin wiring and memoized selector defaults, but those are low-impact.

Overview
Wallet import flow: Removes the separate CreateWalletImportOptionsScene and integrates per-plugin importKeyOptions collection/editing directly into CreateWalletImportScene, including inline validation, help links, and disabling the Next button until required inputs are valid. The import “test” now calls currencyConfig[pluginId].importKey(importText, { keyOptions }) and passes keyOptions through to createWalletCompletion for final wallet creation.

Staking cleanup: Introduces EMPTY_STAKE_POSITION_MAP to avoid creating a new empty object on each render, and fixes Fantom UniswapV2 stake plugins to break a cyclic import by extracting the ecosystem setup into fantomEcosystem.ts (plus a few small boolean/type-safety tweaks).

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


Resolves the warning

Require cycle: src/plugins/stake-plugins/uniswapV2/policyInfo/fantom.ts -> src/plugins/stake-plugins/uniswapV2/policyInfo/fantom.ts

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
@peachbits
Copy link
Contributor Author

Simulator Screenshot - iPhone 16 Pro - 2026-03-17 at 15 30 39

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