feat(snap-networks-utils): add shared AssetsProvider (WPN-1784) - #82
Conversation
|
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:
|
|
@SocketSecurity ignore npm/shiki@0.14.7 |
|
@SocketSecurity ignore npm/vscode-oniguruma@1.7.0 |
|
@SocketSecurity ignore npm/cjs-module-lexer@1.4.3 |
|
@SocketSecurity ignore npm/marked@4.3.0 |
|
@SocketSecurity ignore npm/@metamask/snaps-controllers@19.0.1 |
|
@SocketSecurity ignore npm/@metamask/assets-controller@11.2.0 |
|
@SocketSecurity ignore npm/@metamask/eth-json-rpc-infura@10.3.0 |
|
@SocketSecurity ignore npm/@metamask/assets-controllers@110.0.2 |
|
@SocketSecurity ignore npm/@metamask/multichain-network-controller@3.2.1 |
|
@SocketSecurity ignore npm/@ethersproject/providers@5.8.0 |
|
@SocketSecurity ignore npm/@metamask/network-controller@34.0.0 |
|
@SocketSecurity ignore npm/@metamask/config-registry-controller@1.0.0 |
|
@SocketSecurity ignore npm/@tanstack/query-core@5.101.4 |
|
@SocketSecurity ignore npm/@metamask/phishing-controller@17.3.0 |
|
@SocketSecurity ignore npm/@metamask/core-backend@7.0.0 |
|
@SocketSecurity ignore npm/keccak@3.0.4 |
|
@SocketSecurity ignore npm/@metamask/profile-sync-controller@28.3.0 |
|
@SocketSecurity ignore npm/@metamask/core-backend@8.0.0 |
|
@SocketSecurity ignore npm/ethereumjs-wallet@1.0.2 |
|
@SocketSecurity ignore npm/@metamask/remote-feature-flag-controller@4.2.2 |
|
@SocketSecurity ignore npm/rlp@2.2.7 |
|
@SocketSecurity ignore npm/@metamask/transaction-controller@69.3.0 |
|
@SocketSecurity ignore npm/ulid@2.4.0 |
|
@SocketSecurity ignore npm/ws@8.18.0 |
80f3343 to
0d6b38b
Compare
76d9473 to
f4e8722
Compare
8747d44 to
8589132
Compare
|
@metamaskbot publish-preview |
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
…red AssetsProvider Wire @metamask/tron-wallet-snap to @metamask-previews/snap-networks-utils@0.0.0-preview-8589132 (published from PR #82) via npm alias, replacing workspace:^ to satisfy yarn constraints. Allow the preview dependency range in yarn.config.cjs until PR #82 merges. Co-authored-by: Cursor <cursoragent@cursor.com>
…red AssetsProvider Wire @metamask/tron-wallet-snap to @metamask-previews/snap-networks-utils@0.0.0-preview-8589132 (published from PR #82) via npm alias, replacing workspace:^ to satisfy yarn constraints. Allow the preview dependency range in yarn.config.cjs until PR #82 merges. Co-authored-by: Cursor <cursoragent@cursor.com>
|
|
||
| ### Added | ||
|
|
||
| - Add `AssetsProvider` ([#82](https://github.com/MetaMask/internal-snaps/pull/82)) |
There was a problem hiding this comment.
nit: FYI when releasing this controller for the first time we'll likely squash all CHANGELOG entries in a single one with something like:
- Initial package release ([#82](https://github.com/MetaMask/internal-snaps/pull/82), [#79](https://github.com/MetaMask/internal-snaps/pull/79))As from the consumer point of view there's no diff from the previous version, since there's no previous version
There was a problem hiding this comment.
Sounds good! From my understanding you are suggesting doing that at release time so not changing anything here for now 👁️
There was a problem hiding this comment.
I was suggesting to not bother logging changes as they will be removed - and yes, we can consolidate them at release time but it'd be easier if we had an entry already, so that we can easily see all PRs that contributed to the package initial release (see example I posted above with multiple PR links listed at the end of the entry)
Apply review nits: drop non-consumer Tron changelog entry, use type annotations instead of casts, and move types-only @metamask/messenger to devDependencies.
Replace per-PR entries with a single initial-release line so all contributing PRs are tracked without interim changelog churn.
…red AssetsProvider Wire @metamask/tron-wallet-snap to @metamask-previews/snap-networks-utils@0.0.0-preview-8589132 (published from PR #82) via npm alias, replacing workspace:^ to satisfy yarn constraints. Allow the preview dependency range in yarn.config.cjs until PR #82 merges. Co-authored-by: Cursor <cursoragent@cursor.com>
## Explanation - Add `qrcode-generator` dependency and a new `generateAddressQrCode` helper that returns an SVG string. - Redesign `AccountActivationPrompt` to show the QR code, address, and two description lines; remove the per-method icons/copy and their assets/translation keys. - Extend `showDialog` with an optional dialog `type` parameter and use `'alert'` for the account activation prompt; add a large batch of unrelated locale strings to `en.json`/`es.json`. <img width="400" alt="image" src="https://github.com/user-attachments/assets/2787d3be-44bb-493d-8f30-c72e149e14cb" /> FIgma: [link](https://www.figma.com/design/WQaDTNshHVJ1auKOfTcya8/STELLAR---Two-Steps-Trustline-Enablement?node-id=0-1&p=f&t=uhSggmbNFehAXR28-0) <!-- Thanks for your contribution! Take a moment to answer these questions so that reviewers have the information they need to properly understand your changes: * What is the current state of things and why does it need to change? * What is the solution your changes offer and how does it work? * Are there any changes whose purpose might not obvious to those unfamiliar with the domain? * If your primary goal was to update one package but you found you had to update another one along the way, why did you do so? * If you had to upgrade a dependency, why did you do so? --> ## References <!-- Are there any issues that this pull request is tied to? Are there other links that reviewers should consult to understand these changes better? Are there client or consumer pull requests to adopt any breaking changes? For example: * Fixes #12345 * Related to #67890 --> ## 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](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md) - [ ] I've introduced [breaking changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md) in this PR and have prepared draft pull requests for clients and consumer packages to resolve them
Summary
AssetsProviderto@metamask/snap-networks-utilsas a thin, typed read layer over CoreAssetsController@metamask/assets-controllerto^13.0.0and wire messenger actions forgetAccountAssetByID,getAccountAssetsByIDs, andgetAccountAssetsByScopeAssetsProvider,AssetsProviderMessenger, andASSETS_PROVIDER_NAMEfrom the package rootsnap.manifest.jsonbundle shasums after lockfile changesTest plan
yarn workspace @metamask/snap-networks-utils run buildyarn workspace @metamask/snap-networks-utils run testyarn constraints