You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Those metadata are duplicated from the `SnapController` data. We should
instead be using this controller to query those, thus, making the
controller the only source of truth and avoid `:stateChange` handling on
the `AccountsController` too!
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Breaking change to `InternalAccount` metadata shape: code consuming
`metadata.snap.name`/`metadata.snap.enabled` will fail until updated to
query `SnapController:getSnap` instead. Runtime logic change is small
but impacts multiple packages and downstream integrations expecting
those fields.
>
> **Overview**
> **BREAKING:** Removes `metadata.snap.name` and `metadata.snap.enabled`
from `InternalAccount`, leaving only `metadata.snap.id` and updating
validation accordingly.
>
> `SnapKeyring` now only attaches `{ id }` as snap metadata when
transforming accounts, and tests/changelogs are updated to reflect the
new source-of-truth being `SnapController:getSnap` for snap name/enabled
state.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
5a0838b. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Copy file name to clipboardExpand all lines: packages/keyring-snap-bridge/CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
12
12
-**BREAKING:** No longer use `snapId` as constructor parameter for `SnapKeyring` (v2) ([#519](https://github.com/MetaMask/accounts/pull/519))
13
13
- The `snapId` is now passed and bound to the keyring upon the first `deserialize` call, to better integrate with `KeyringController` keyrings lifecyle and keyring builders.
14
14
15
+
### Removed
16
+
17
+
-**BREAKING:** Removed `snap.{name,enabled}` from `InternalAccount` metadata produced by `SnapKeyring` ([#525](https://github.com/MetaMask/accounts/pull/525))
18
+
- Use `SnapController:getSnap` to get those information instead (in combination with `InternalAccount.metadata.snap.id`).
0 commit comments