Skip to content

add missing promptToCreateSolanaAccount flag #5856

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

adonesky1
Copy link
Contributor

@adonesky1 adonesky1 commented May 23, 2025

Explanation

If solana is a requested scope but not supported, we add a promptToCreateSolanaAccount metadata flag to forward to the connection UI

See designs here for the "opt in" flow this enables

Screenshot 2025-05-23 at 2 17 15 PM

References

Extension PR - since currently extension has its own wallet_createSession handler. We'll consolidate these soon

Changelog

@metamask/multichain-api-middleware

  • Added: when wallet_createSession is called with solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp as a requested scope, but there are not currently any accounts in the wallet supporting this scope, we add a promptToCreateSolanaAccount to a metadata object on the requestPermissions call.

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, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@adonesky1 adonesky1 requested a review from a team as a code owner May 23, 2025 18:52
@adonesky1 adonesky1 force-pushed the ad/promptToCreateSolanaAccount branch from 2a3d765 to 9a6c7cd Compare May 23, 2025 19:27
@adonesky1 adonesky1 requested a review from a team as a code owner May 23, 2025 20:02
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