Skip to content

fix: unlock no seed reveal - #282

Open
ahmed-tarek-salem wants to merge 1 commit into
mainfrom
fix/unlock-no-seed-reveal
Open

ahmed-tarek-salem wants to merge 1 commit into
mainfrom
fix/unlock-no-seed-reveal

Conversation

@ahmed-tarek-salem

Copy link
Copy Markdown
Contributor

No description provided.

Unlock previously called revealSeed() (decrypting a seed to plaintext) just
to run a private/public key-match check and detect watch-only wallets. That
decrypted the user's first seed on every unlock, needlessly widening the
attack surface.

Replace it with WalletService.hasValidKeyPair(), which validates the key pair
internally and returns a boolean without ever returning or storing the
plaintext seed. Watch-only wallets are detected from metadata (isOnlyWatch)
with no decryption at all. Behavior is otherwise unchanged.

revealSeed() is now only called when a seed is genuinely needed (send, backup,
signing).
@sallymoc
sallymoc force-pushed the fix/unlock-no-seed-reveal branch from 84960b5 to 943af58 Compare August 13, 2026 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

2 participants