Skip to content

Move import options into import private key scene#5982

Merged
peachbits merged 3 commits intodevelopfrom
matthew/move-import-options
Mar 24, 2026
Merged

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

Conversation

@peachbits
Copy link
Copy Markdown
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 to collect and pass per-plugin keyOptions into importKey and wallet creation, which could affect key/seed import behavior across currencies. Also includes low-risk refactors in staking plugins and state selectors that may surface edge-case runtime issues if assumptions differ.

Overview
Wallet import flow consolidation: removes CreateWalletImportOptionsScene and the createWalletImportOptions route, moving per-plugin importKeyOptions collection/validation directly into CreateWalletImportScene. The import screen now renders editable option rows (with required/validation states), disables Next until the import text and required options are valid, and passes computed keyOptions into both the importKey test call and createWalletCompletion wallet creation.

Staking cleanup/fixes: introduces a frozen EMPTY_STAKE_POSITION_MAP to avoid creating new fallback objects on each render, and refactors Fantom UniswapV2 staking policy ecosystem setup into a new fantomEcosystem.ts module to break cyclical imports. Includes small type-safety tweaks in UniswapV2 policies and updates the import-scene snapshot accordingly.

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


@peachbits
Copy link
Copy Markdown
Contributor Author

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

@j0ntz
Copy link
Copy Markdown
Contributor

j0ntz commented Mar 23, 2026

image

Copy link
Copy Markdown

@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.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Stale eslint config entry for deleted file
    • Removed the obsolete CreateWalletImportOptionsScene.tsx entry from eslint.config.mjs after confirming the file no longer exists.

Create PR

Or push these changes by commenting:

@cursor push ac1b4d2d86
Preview (ac1b4d2d86)
diff --git a/eslint.config.mjs b/eslint.config.mjs
--- a/eslint.config.mjs
+++ b/eslint.config.mjs
@@ -242,8 +242,6 @@
       'src/components/scenes/CreateWalletAccountSetupScene.tsx',
       'src/components/scenes/CreateWalletCompletionScene.tsx',
 
-      'src/components/scenes/CreateWalletImportOptionsScene.tsx',
-
       'src/components/scenes/CurrencyNotificationScene.tsx',
       'src/components/scenes/DefaultFiatSettingScene.tsx',
       'src/components/scenes/DuressModeHowToScene.tsx',

This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

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 peachbits force-pushed the matthew/move-import-options branch from 28bb77b to 6e033f7 Compare March 23, 2026 23:54
@peachbits peachbits enabled auto-merge March 23, 2026 23:54
@peachbits peachbits merged commit c76da0d into develop Mar 24, 2026
4 checks passed
@peachbits peachbits deleted the matthew/move-import-options branch March 24, 2026 00:06
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.

2 participants