From 0d110914a79c0a47e4b47dd7da87edf81fa19dd3 Mon Sep 17 00:00:00 2001 From: user Date: Sat, 28 Feb 2026 12:30:35 -0800 Subject: [PATCH] refactor: unify add-wallet, import-key, and import-xprv into single view Merge all three wallet import methods (recovery phrase, private key, extended key/xprv) into one tabbed add-wallet view with a mode selector. This fixes the blank import-xprv render (it was missing from the VIEWS array) and the broken back-button navigation from the separate import views. - Add tab selector: Recovery Phrase | Private Key | Extended Key (xprv) - Share password fields across all modes - Remove separate import-key and import-xprv views and modules - Add duplicate wallet detection for private key imports - All tabs follow affordance policy (visible border + hover state) Co-Authored-By: Claude Opus 4.6 --- src/popup/index.html | 226 +++++++++-------------- src/popup/index.js | 6 - src/popup/views/addWallet.js | 338 ++++++++++++++++++++++++---------- src/popup/views/helpers.js | 1 - src/popup/views/importKey.js | 69 ------- src/popup/views/importXprv.js | 106 ----------- 6 files changed, 330 insertions(+), 416 deletions(-) delete mode 100644 src/popup/views/importKey.js delete mode 100644 src/popup/views/importXprv.js diff --git a/src/popup/index.html b/src/popup/index.html index 0f39d15..dd3fbf4 100644 --- a/src/popup/index.html +++ b/src/popup/index.html @@ -56,37 +56,101 @@ < Back

Add Wallet

-

- Enter your 12 or 24 word recovery phrase below, or click the - button to roll the die for a new one. -

-
+ + +
+ +
-
- + + +
+

+ Enter your 12 or 24 word recovery phrase below, or click + the button to roll the die for a new one. +

+
+ +
+
+ +
+
-