feat(wallet): Add split persistence backed by better-sqlite3#8480
Draft
rekmarks wants to merge 3 commits intofeat/wallet-libraryfrom
Draft
feat(wallet): Add split persistence backed by better-sqlite3#8480rekmarks wants to merge 3 commits intofeat/wallet-libraryfrom
rekmarks wants to merge 3 commits intofeat/wallet-libraryfrom
Conversation
Persist controller state to SQLite using a per-property key-value scheme (one row per ControllerName.propertyName). Writes are synchronous within the same call stack as controller state updates, using stateChanged events and Immer patches to write only changed, persist-flagged properties. Defaults to ':memory:' when no database path is provided. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.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:
|
Member
Author
|
@SocketSecurity ignore npm/better-sqlite3@11.10.0 Yes, it has native binaries. |
The build tsconfig is stricter than the dev tsconfig — the union type of controller instances does not expose the protected `destroy` method. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
Author
|
@SocketSecurity ignore-all All alerts are due to |
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
persist: truemetadata gets its own row in akvtable (key format:ControllerName.propertyName)controller.update()viastateChangedevent subscriptions, eliminating data loss windows:memory:when no database path is providedTest plan
yarn workspace @metamask/wallet exec jest --no-coverage --watchman=false src/persistence/— 22 unit tests covering KeyValueStore CRUD, loadState grouping, persist filtering, StateDeriver application, patch-based diffing, unsubscribe, and multi-controller scenariosyarn workspace @metamask/wallet exec tsc --noEmit— no new type errors🤖 Generated with Claude Code