Skip to content

Conversation

@ScreamingHawk
Copy link
Contributor

@ScreamingHawk ScreamingHawk commented Oct 22, 2025

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:

  • The wallet-migration package depends on v2 packages. To avoid dependency bloat in core, core does not depend on wallet-migration.
  • packages/wallet/core/src/utils/migration/migration-encoder.ts contains 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?
  • The MigrationEncoder_v1v3 creates 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.Provider is hard coded to only support v3 wallets. This PR adds forceSaveConfiguration, 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.
  • Context in wallet-primitives is now aware of the v1 and v2 context with getVersionFromContext. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants