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
{{ message }}
Repository navigation
platform-wallet: test that async manager mutations emit faithful changesets #5094
Restores rebuild wallet state by applying persisted changesets, so every mutation must emit a changeset that apply_changeset turns back into the same state. The round-trip tests in packages/rs-platform-wallet/src/wallet/apply.rs ("Round-trip tests") check this for the synchronous mutations only. Their header comment names the gap:
AssetLockManager / token sync / PlatformAddressWallet mutations are async and require an Sdk + broadcaster + Notify, so they can't run as plain unit tests.
As a result nothing checks that these mutations emit faithful changesets:
asset locks: track, advance status, remove (wallet/asset_lock/manager.rs and wallet/asset_lock/sync/tracking.rs have no tests)
Platform addresses: sync, transfer, withdraw
token balance sync (IdentitySyncManager)
To do: for each, mutate a wallet, capture the emitted changeset, apply it to a sibling wallet, and compare the touched state. The asset-lock recovery tests already drive async waits through crate::test_support (WalletSigner, a lock notify handle), which may be enough to do this without a live network.
Previously tracked only in the committed PERSISTENCE_REDESIGN.md plan, removed in #5060.
Activity