Skip to content

fix(tron-wallet-snap): use scopes from the snap manifest for discovery/account creation - #135

Open
hmalik88 wants to merge 7 commits into
mainfrom
hm/fix-tron-scopes
Open

fix(tron-wallet-snap): use scopes from the snap manifest for discovery/account creation#135
hmalik88 wants to merge 7 commits into
mainfrom
hm/fix-tron-scopes

Conversation

@hmalik88

@hmalik88 hmalik88 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Explanation

The source of truth for a snap's supported scopes should be the manifest. The tron snap was incorrectly using hardcoded values (which included testnets), this was caught at the client level because we started to see a perf regression in the onboarding wallet numbers.

Screenshot 2026-08-06 at 7 44 25 PM

References

N/A

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

@hmalik88
hmalik88 marked this pull request as ready for review August 6, 2026 17:47
@hmalik88
hmalik88 requested a review from a team as a code owner August 6, 2026 17:47
type: TrxAccountType.Eoa,
address: 'TConcurrent0',
scopes: [TrxScope.Mainnet, TrxScope.Nile, TrxScope.Shasta],
scopes: SUPPORTED_SCOPES as unknown as Network[],

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Having to cast here because there's a mismatch between the readonly Network[] type and KeyringAccount's scopes property. I'm going to review usage of the property across our architecture and possibly tighten the type upstream.

@hmalik88

hmalik88 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

@metamaskbot publish-preview

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Preview builds have been published. Learn how to use preview builds in other projects.

Expand for full list of packages and versions.
@metamask-previews/bitcoin-wallet-snap@2.0.1-preview-563752c
@metamask-previews/snap-networks-utils@1.0.0-preview-563752c
@metamask-previews/solana-wallet-snap@5.0.1-preview-563752c
@metamask-previews/tron-wallet-snap@3.0.0-preview-563752c

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