Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions oxlint-suppressions.json
Original file line number Diff line number Diff line change
Expand Up @@ -816,15 +816,6 @@
"packages/assets-controller/src/data-sources/SnapDataSource.test.ts": {
"no-useless-return": {
"count": 1
},
"typescript/no-unsafe-assignment": {
"count": 6
},
"typescript/no-unsafe-member-access": {
"count": 1
},
"typescript/no-unsafe-return": {
"count": 1
}
},
"packages/assets-controller/src/data-sources/SnapDataSource.ts": {
Expand Down Expand Up @@ -2553,7 +2544,7 @@
"count": 1
},
"typescript/no-unsafe-assignment": {
"count": 9
"count": 11
},
"typescript/no-unsafe-member-access": {
"count": 2
Expand Down
1 change: 1 addition & 0 deletions packages/assets-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Temporarily extend `SnapDataSource` v6 balance fetches, in a deletable block, to also request every token already stored in balance state for the requested chains, so a rollback to Snaps still refreshes tokens that Accounts API and the websocket already support. Remove that block once balance reads fully move to Accounts API ([#10819](https://github.com/MetaMask/core/pull/10819))
- Bump `@metamask/keyring-api` from `^24.1.0` to `^24.3.0` ([#10792](https://github.com/MetaMask/core/pull/10792), [#10844](https://github.com/MetaMask/core/pull/10844))
- Bump `@metamask/keyring-internal-api` from `^12.1.0` to `^12.1.2` ([#10792](https://github.com/MetaMask/core/pull/10792), [#10844](https://github.com/MetaMask/core/pull/10844))
- Bump `@metamask/keyring-snap-client` from `^10.0.0` to `^10.0.1` ([#10792](https://github.com/MetaMask/core/pull/10792))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,13 @@ The requests differ as well:
in full from state. RPC always stamps `full`: resolved tokens get a fresh
amount, unread tokens keep the amount already in state, and a chain that
resolved nothing is listed in `errors` instead of writing an empty slice.
Snap `#fetchV6` requests visible assets with listed holdings, stamps `full`,
and fills omitted visible assets from current state (`0` if none). An empty
Snap `#fetchV6` requests listed holdings and visible assets, stamps `full`,
and fills omitted visible assets from current state (`0` if none). A separate
temporary block also requests every token already in balance state for those
chains. A token the snap omits stays out of the snapshot. Accounts API and
the websocket already cover more tokens than the snap lists, so a chain that
rolls back to the snap still refreshes them. Delete that block once balance
reads fully move to Accounts API. An empty
`getAccountBalances` map (or a thrown fetch) contributes nothing, so last-
known amounts are kept. Background Snap and
RPC both stamp `full`. `mergeDataResponses` promotes `full` if any source did.
Expand Down Expand Up @@ -184,7 +189,7 @@ flowchart TB
V6A["Subscribe each source with accounts + assigned chains only"]
V6WS["Account Activity · event deltas · merge"]
V6API["Accounts API · visibility from state · full"]
V6SNAP["Snap · visible assets from state · full snapshot<br/>balance events stay merge"]
V6SNAP["Snap · visible assets · full snapshot<br/>temporary balance-state tokens<br/>balance events stay merge"]
V6RPC["RPC · visible assets from state · full"]
V6A --> V6WS
V6A --> V6API
Expand Down
Loading
Loading