Skip to content

Show both the seed phrase and private key - #6207

Open
j0ntz wants to merge 2 commits into
developfrom
jon/seed-vs-private-key
Open

Show both the seed phrase and private key#6207
j0ntz wants to merge 2 commits into
developfrom
jon/seed-vs-private-key

Conversation

@j0ntz

@j0ntz j0ntz commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

EdgeApp/edge-currency-accountbased#1097

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)

Description

Asana: https://app.asana.com/0/1215088146871429/1210071879529859

The dependency PR makes getDisplayPrivateKey return the wallet's seed phrase
whenever it has one, so Wallet Options > Master Private Key would otherwise
stop offering the hex key that MetaMask-style imports ask for. This shows both,
labeled, whenever the wallet stores a hex key that differs from what the plugin
chose to display:

Master Private Seed
position inherit gold shop ...

Master Private Key
1978dcb80f89aeebaf...

A wallet imported from a raw private key has no seed and still shows a single
value, exactly as before.

The hex key comes from account.getRawPrivateKey() via a new
getWalletHexPrivateKey helper, keyed on the ${pluginId}Key name the
account-based EVM plugins use, and gated on the value matching
/^(0x)?[0-9a-fA-F]{64}$/. That field name is a cross-family convention rather
than an EVM one, and the UTXO plugins keep a base64 or WIF seed under it, so the
shape check is what keeps a Bitcoin-family seed from surfacing as a bogus
Master Private Key. Anything that fails it gets the single-value modal, so
there is no per-chain allowlist to keep current.

Stake-policy regression this also fixes

The uniswapV2 stake policies (Tomb masonry and cemetery on Fantom, Velodrome V2
on Optimism) passed account.getDisplayPrivateKey() straight into
new ethers.Wallet(seed), which only accepts a private key. Once the plugin
returns a mnemonic those six call sites break, so they now read the stored hex
key through getSignerSeed.

The first commit clears pre-existing lint warnings in the two files that leave
the suppression list once touched.

These files leave the warning suppression list once they are touched.
@j0ntz

j0ntz commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

📸 Test evidence

wallet options menu

wallet options menu

eth seed and private key

eth seed and private key

imported key only

imported key only

Captured by the agent's in-app test run (build-and-test).

@j0ntz
j0ntz marked this pull request as ready for review September 9, 2026 01:05
@j0ntz
j0ntz force-pushed the jon/seed-vs-private-key branch from d6e5575 to 424f8c6 Compare September 9, 2026 01:05
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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 using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 424f8c6. Configure here.

Comment thread src/util/CurrencyWalletHelpers.ts
`getDisplayPrivateKey` now returns the wallet's seed phrase whenever it has
one, so Master Private Key would otherwise stop offering the hex key that
MetaMask-style imports ask for. Show both, labeled, whenever the wallet
stores a hex key that differs from what the plugin chose to display. A
wallet imported from a raw private key has no seed and still shows a single
value.

The uniswapV2 stake policies used the same call as an ethers signing key,
which only accepts a private key. They now read the stored hex key directly.
@j0ntz
j0ntz force-pushed the jon/seed-vs-private-key branch from 424f8c6 to e266853 Compare September 9, 2026 01:23
@j0ntz

j0ntz commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

📸 Test evidence (after fix)

btc single value

btc single value

evm both after fix

evm both after fix

Captured by the agent's in-app test run (build-and-test).

@j0ntz

j0ntz commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

📸 Test evidence (FIO)

fio seed

fio seed

Captured by the agent's in-app test run (build-and-test).

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