fix: cross-wallet-type duplicate detection — closes #111 #115
No reviewers
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/AutistMask#115
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/issue-111-cross-wallet-dedup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Previously, duplicate detection during wallet import only checked against wallets of the same type:
keywalletshdandxprvwalletshdwalletsThis meant importing a private key whose address already existed in an HD wallet would succeed, creating a duplicate.
Changes
findWalletByAddress()— checks address across ALL wallet typesfindWalletByXpub()— checks xpub across all HD-type walletsfindWalletByAddress()for cross-type dedupcloses #111
Cross-wallet-type duplicate detection implemented. All three import paths (mnemonic, private key, xprv) now check addresses across ALL wallet types, and HD-type imports also compare xpubs. Docker build passes. Ready for review.
Review: ✅ PASS
Changes reviewed: Single file (
src/popup/views/addWallet.js) — 37 additions, 23 deletions.What it does:
findWalletByAddress()(checks across ALL wallet types) andfindWalletByXpub()(checks across HD-type wallets)Correctness: Directly fixes #111. Address comparison is case-insensitive. No wallet type can bypass dedup anymore.
Code quality: Clean refactor, good JSDoc comments, no unnecessary changes.
No linter/test/Makefile/Dockerfile modifications.
Docker build: passes.
Branch: up to date with main, no rebase needed.
Approving for merge.