fix(tron-wallet-snap): use scopes from the snap manifest for discovery/account creation - #135
Open
hmalik88 wants to merge 7 commits into
Open
fix(tron-wallet-snap): use scopes from the snap manifest for discovery/account creation#135hmalik88 wants to merge 7 commits into
hmalik88 wants to merge 7 commits into
Conversation
hmalik88
marked this pull request as ready for review
August 6, 2026 17:47
hmalik88
commented
Aug 6, 2026
| type: TrxAccountType.Eoa, | ||
| address: 'TConcurrent0', | ||
| scopes: [TrxScope.Mainnet, TrxScope.Nile, TrxScope.Shasta], | ||
| scopes: SUPPORTED_SCOPES as unknown as Network[], |
Contributor
Author
There was a problem hiding this comment.
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.
Contributor
Author
|
@metamaskbot publish-preview |
Contributor
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
ulissesferreira
approved these changes
Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
References
N/A
Checklist