Skip to content

Conversation

@ekzyis
Copy link
Member

@ekzyis ekzyis commented Sep 28, 2025

Description

This allows to download the passphrase instead of only copying it.

The file is named stacker-news-passphrase.txt. Example content:

STACKER NEWS PASSPHRASE
-----------------------

Your passphrase to unlock your wallets on any device is:

that lonely tooth economy trouble property boss album genre fury insane burden

Please keep this passphrase safe and do not share it with anyone.

Screenshots

before:

2025-09-28-183536_518x411_scrot

after:

2025-09-28-183445_519x409_scrot

Checklist

Are your changes backward compatible? Please answer below:

yes

On a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below:

10. Clicking the button prompts me to save the file.

For frontend changes: Tested on mobile, light and dark mode? Please answer below:

n/a

Did you introduce any new environment variables? If so, call them out explicitly here:

no

Did you use AI for this? If so, how much did it assist you?

no


Note

Adds a button to download the wallet passphrase as a text file alongside the existing copy option.

  • Frontend (wallets):
    • Passphrase UI (wallets/client/components/passphrase.js):
      • Add DownloadButton to save passphrase to stacker-news-passphrase.txt via Blob download.
      • Update actions layout to centered with "or" separator; change prompt wording to "save" passphrase.
      • Import react-bootstrap/Button, use useCallback, and add local download helper.

Written by Cursor Bugbot for commit 57210f7. This will update automatically on new commits. Configure here.

@ekzyis ekzyis added feature new product features that weren't there before wallets labels Sep 28, 2025
cursor[bot]

This comment was marked as outdated.

a.click()
document.body.removeChild(a)
URL.revokeObjectURL(url)
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Race Condition in Immediate Resource Cleanup

The download function has a race condition. The object URL is revoked and the anchor element removed immediately after a.click(). Since a.click() is asynchronous, the browser may not initiate the download before these resources are cleaned up, which can cause the download to fail.

Fix in Cursor Fix in Web

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mhhh

@ekzyis ekzyis marked this pull request as draft October 19, 2025 10:16
@ekzyis ekzyis force-pushed the passphrase-download branch from 57210f7 to f81312b Compare October 19, 2025 11:57
@ekzyis ekzyis force-pushed the passphrase-download branch from f81312b to 59d76e7 Compare October 19, 2025 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature new product features that weren't there before wallets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant