Skip to content

feat: add qr code on account activation dialog#82

Merged
stanleyyconsensys merged 4 commits into
mainfrom
feat/add-address-qr-code
May 29, 2026
Merged

feat: add qr code on account activation dialog#82
stanleyyconsensys merged 4 commits into
mainfrom
feat/add-address-qr-code

Conversation

@stanleyyconsensys
Copy link
Copy Markdown
Collaborator

@stanleyyconsensys stanleyyconsensys commented May 29, 2026

Explanation

  • Add qrcode-generator dependency and a new generateAddressQrCode helper that returns an SVG string.
  • Redesign AccountActivationPrompt to show the QR code, address, and two description lines; remove the per-method icons/copy and their assets/translation keys.
  • Extend showDialog with an optional dialog type parameter and use 'alert' for the account activation prompt; add a large batch of unrelated locale strings to en.json/es.json.
image

FIgma: link

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

@stanleyyconsensys stanleyyconsensys requested a review from a team as a code owner May 29, 2026 03:50
@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 29, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedqrcode-generator@​2.0.410010010084100

View full report

"jest-transform-stub": "2.0.0",
"lodash": "^4.18.1",
"prettier": "^3.5.3",
"qrcode-generator": "^2.0.4",
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

same package as extension, but not sure if mobile is working or not

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Replaces the textual "method 1 / method 2" funding instructions on the account activation prompt with a QR code of the user's Stellar address, and switches that dialog to the alert type. Also pulls in a qrcode-generator dependency and adds many new translation keys that appear unrelated to QR support.

Changes:

  • Add qrcode-generator dependency and a new generateAddressQrCode helper that returns an SVG string.
  • Redesign AccountActivationPrompt to show the QR code, address, and two description lines; remove the per-method icons/copy and their assets/translation keys.
  • Extend showDialog with an optional dialog type parameter and use 'alert' for the account activation prompt; add a large batch of unrelated locale strings to en.json/es.json.

Reviewed changes

Copilot reviewed 9 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/snap/package.json Adds qrcode-generator@^2.0.4 dependency.
yarn.lock Lockfile entry for qrcode-generator.
packages/snap/src/ui/confirmation/qrcode.ts New helper generating an SVG QR code for a Stellar address.
packages/snap/src/ui/confirmation/views/AccountActivationPrompt/AccountActivationPrompt.tsx Replaces method icons/sections with a QR code + address + two description lines.
packages/snap/src/ui/confirmation/views/AccountActivationPrompt/render.tsx Passes 'alert' to showDialog.
packages/snap/src/utils/snap.ts Adds optional type parameter to showDialog.
packages/snap/src/ui/images/index.ts Removes exports for the now-unused method icons.
packages/snap/src/ui/images/account-active-method-1.svg, account-active-method-2.svg Deletes the unused method icon assets.
packages/snap/messages.json Updates activation copy, adds description2, removes method1/method2 keys.
packages/snap/locales/en.json Mirrors messages.json changes for account activation copy.
packages/snap/locales/es.json Adds a large block of locale keys (most unrelated to QR support) plus activation copy updates.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/snap/messages.json Outdated
</Box>
</Section>
</Box>
<Footer>
Copy link
Copy Markdown
Collaborator Author

@stanleyyconsensys stanleyyconsensys May 29, 2026

Choose a reason for hiding this comment

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

the custom dialog has bug, sometime it show 2 buttons (default cancel + close button)
so we going back to use alert dialog with no self button customization

@stanleyyconsensys stanleyyconsensys changed the title feat: add qr code support feat: add qr code on account activation dialog May 29, 2026
Copy link
Copy Markdown
Contributor

@khanti42 khanti42 left a comment

Choose a reason for hiding this comment

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

LGTM

@stanleyyconsensys stanleyyconsensys merged commit 4e2b73a into main May 29, 2026
10 checks passed
@stanleyyconsensys stanleyyconsensys deleted the feat/add-address-qr-code branch May 29, 2026 13:05
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.

3 participants