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.
Depends on https://github.com/0xsequence/sequence-sessions/pull/95
This adds a new wallet-migration package to v3, and a migrator from v1 to v3. This package will later include v2 -> v3 and v3 -> v3 migrations.
Specifics to review:
packages/wallet/core/src/utils/migration/migration-encoder.tscontains v2 transaction bundle encoding. This is here as a consequence of the above decision. Another option here is to encode the transaction bundle in keymachine and return{to, data}instead. Thoughts?MigrationEncoder_v1v3creates a v3 config with two branches, one that allows the old v1 configuration of signers to still produce a valid signature, one that is roughly equivalent to that created by the wdk.State.Sequence.Provideris hard coded to only support v3 wallets. This PR addsforceSaveConfiguration, taking arbitrary parameters to send to the service. Using other providers like State.Local.Provider do not need this. This is only needed because of how getConfigurationUpdates in keymachine validates.Contextin wallet-primitives is now aware of the v1 and v2 context withgetVersionFromContext. It assumes any other context is v3.Note in v2 the trackers were excluded from the wallet package which made avoiding circular dependencies easier. In v3, the State providers are in core.