-
Notifications
You must be signed in to change notification settings - Fork 39
Export seed when available #585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for cheery-moxie-4f1121 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
JSKitty
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JSKitty
Tested the full export/import flow on the deploy preview. Imported a mnemonic, skipped encryption, exported — got a base64 seed. Deleted the wallet, re-imported the base64 seed, and the wallet recreated with the same address. The core functionality works, but there's a couple code issues I'll let Claude expand on below.
Claude Audit
Bug 1: Double call to getSecretToExport()
In scripts/composables/use_wallet.js — getSecretToBackup():
const secret = v.getSecretToExport();
if (typeof v.getSecretToExport() === 'string') {v.getSecretToExport() is called twice — once stored in secret, then again in the typeof check. This is unnecessary computation; should be typeof secret.
Bug 2: Stale isJSON prop — users can download a .json file that isn't JSON
In Dashboard.vue, the export modal still has:
<ExportPrivKey :isJSON="hasShield && !activeVault?.isEncrypted" ... />For unencrypted seeded vaults, getSecretToBackup() now returns a base64 seed string, not JSON. But isJSON still evaluates to true, so the "Download Wallet File" button appears and offers a .json download containing raw base64 — not valid JSON.
✅ Deploy Preview for cheery-moxie-4f1121 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
I removed the slightly awkward isJSON and now:
|
Abstract
Add the ability for MPW to accept and import base64 encoded seeds,
Export (optionally encrypted) seed when clicking on the "Export" instead of exporting the singular wallet
Testing
Test exporting on a different types of vaults (Legacy, seeded, unseeded)