feat: add shared AssetsService to snap-networks-utils - #80
feat: add shared AssetsService to snap-networks-utils#80ulissesferreira wants to merge 10 commits into
Conversation
Port the thin Core AssetsController read layer from the shared-assets proposal into the real shared package, stacked on WPN-1632.
Move assets under services/, use scope params, return ID maps, assert account refs, adopt with* test helpers, and fix toUiAmount trailing-zero trimming for CodeQL. Co-authored-by: Ulisses Ferreira <ulisses@hey.com>
Create mocks inside the helper, take only the callback, and use payload / assetsService / mockCoreMessenger naming. Co-authored-by: Ulisses Ferreira <ulisses@hey.com>
Follow Core's root-only exports pattern; AssetsService remains available from the package root. Leave ./logger as it came from the base branch. Co-authored-by: Ulisses Ferreira <ulisses@hey.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. Ignoring alerts on:
|
Drop the internal account ref helper, type account IDs as AccountId, move mapControllerAsset under services/assets/utils, and export from the package root without a barrel file.
|
@SocketSecurity ignore npm/@metamask/assets-controller@11.2.0 These are first-party MetaMask packages. |
Reorder package.json dependencies and apply formatting fixes flagged by lint:misc:check.
|
@SocketSecurity ignore npm/@metamask/assets-controller@11.2.0 Reviewed transitive tree introduced by intentional |
Rename getAccountAssets to getAccountAssetsByScope with a required chain filter, update tests accordingly, and align tsconfig Jest types setup.
|
Head branch renamed to |
Summary
WPN-1632-scaffold-snap-networks-utils)shared-assets-serviceproposal into@metamask/snap-networks-utilsAssetsService,mapControllerAsset,toUiAmount, and Core messenger types, with an./assetssubpath exportTest plan
yarn workspace @metamask/snap-networks-utils run buildyarn workspace @metamask/snap-networks-utils run testyarn constraintsWPN-1632-scaffold-snap-networks-utils, notmain