Skip to content

Conversation

@Duddino
Copy link
Member

@Duddino Duddino commented Aug 27, 2025

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)

@Duddino Duddino self-assigned this Aug 27, 2025
@netlify
Copy link

netlify bot commented Aug 27, 2025

Deploy Preview for cheery-moxie-4f1121 ready!

Name Link
🔨 Latest commit 327b643
🔍 Latest deploy log https://app.netlify.com/projects/cheery-moxie-4f1121/deploys/68e4217c2d700a0008fce2a3
😎 Deploy Preview https://deploy-preview-585--cheery-moxie-4f1121.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Member

@JSKitty JSKitty left a 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.jsgetSecretToBackup():

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.

@netlify
Copy link

netlify bot commented Feb 9, 2026

Deploy Preview for cheery-moxie-4f1121 ready!

Name Link
🔨 Latest commit a39457a
🔍 Latest deploy log https://app.netlify.com/projects/cheery-moxie-4f1121/deploys/6989952648177a0008bce354
😎 Deploy Preview https://deploy-preview-585--cheery-moxie-4f1121.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Duddino
Copy link
Member Author

Duddino commented Feb 9, 2026

I removed the slightly awkward isJSON and now:

  • The save button is always visible
  • The file name and MIME type changes based on whether or not the exported key is a JSON or not

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.

2 participants