feat(tron-wallet-snap): add CoreAssetsAdapter and mapControllerAsset - #144
Merged
Merged
Conversation
This was referenced Aug 10, 2026
ulissesferreira
added a commit
that referenced
this pull request
Aug 10, 2026
ulissesferreira
force-pushed
the
WPN-1497-implement-core-assets-adapter
branch
from
August 10, 2026 14:13
714b17d to
3550d24
Compare
This was referenced Aug 10, 2026
ulissesferreira
added a commit
that referenced
this pull request
Aug 10, 2026
ulissesferreira
force-pushed
the
WPN-1497-implement-core-assets-adapter
branch
from
August 10, 2026 15:07
3550d24 to
a42b752
Compare
Base automatically changed from
WPN-1497-extract-shared-asset-util-functions
to
main
August 10, 2026 16:21
ulissesferreira
added a commit
that referenced
this pull request
Aug 10, 2026
ulissesferreira
force-pushed
the
WPN-1497-implement-core-assets-adapter
branch
from
August 10, 2026 16:31
c043490 to
176828a
Compare
taran-a
reviewed
Aug 11, 2026
taran-a
reviewed
Aug 11, 2026
taran-a
reviewed
Aug 11, 2026
taran-a
reviewed
Aug 11, 2026
ulissesferreira
commented
Aug 14, 2026
ulissesferreira
force-pushed
the
WPN-1497-implement-core-assets-adapter
branch
3 times, most recently
from
August 14, 2026 12:49
c075319 to
69e150f
Compare
Introduce CoreAssetsAdapter with AssetsController reads and snap-owned fetch/publish helpers. Wire it into AssetsService unused pending routing.
Match AssetsProvider's Caip19AssetId contract, align accountId naming, and cover controller reads plus snap-owned publish paths.
ulissesferreira
force-pushed
the
WPN-1497-implement-core-assets-adapter
branch
from
August 14, 2026 12:49
69e150f to
cc94a88
Compare
stanleyyconsensys
approved these changes
Aug 14, 2026
stanleyyconsensys
left a comment
Contributor
There was a problem hiding this comment.
LGTM, just minor nit pick, can choose to fix or fix later
| this.#getAddressStakingRewards(scope, account.address), | ||
| ]); | ||
|
|
||
| if (addressInfoRequest.status === 'rejected') { |
Contributor
There was a problem hiding this comment.
this is super nit:
i didnt go detail
but when we say reject, is it a http temporary fail issue, or it is a error saying account not found?
may be we can consider to check the reason
Contributor
Author
There was a problem hiding this comment.
Great thinking! Opening a PR with this!
| const stakedData = buildStakedData(addressInfoRequest); | ||
| const resources = buildAccountResources(addressResourcesRequest); | ||
| const stakingRewards = | ||
| addressStakingRewardsRequest.status === 'fulfilled' |
4 tasks
4 tasks
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.
Summary
CoreAssetsAdapterandmapControllerAssetfor AssetsController integrationCoreAssetsAdapterincontext.tsand store it onAssetsServiceunused (eslint-ignored reserved slot)Part of WPN-1497. Stack:
Test plan
yarn workspace @metamask/tron-wallet-snap run buildyarn workspace @metamask/tron-wallet-snap run jest --no-coverage src/services/assets/AssetsService.test.ts src/services/assets/utils/mapControllerAsset.test.ts