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: make Rust the single source of Core transaction accounting (drop Swift re-derivation) #5226
The same wallet can therefore show different history on DET (SQLite) and iOS (SwiftData), and every checker or contact-ownership change must be made twice. packages/swift-sdk/CLAUDE.md already states that Rust owns this logic.
Follow-up: after the load-time replay, fold per-account slices into wallet-level records, diff them against the stored values, and emit only corrected records through the normal persist callbacks. Never downgrade a stored spend when prevout history is missing.
Delete the Swift re-derivation: reconcileTransactionAccounting, accountingDirty, reconciledAccounting, the preserveLockAccounting special case, and the related tests.
Add a parity test between the fold and SQLite repair_record.
Open decisions
Cross-wallet rows: a SwiftData PersistentTransaction is keyed by txid across all local wallets, while Rust emits per-wallet values. Proposal: add a spends_wallet_funds flag to TransactionRecordFFI and keep one precedence rule in Swift.
Live gap: if a spender is already chain-locked and pruned when its funding transaction is discovered later in the same session, Rust corrects the record only at the next load.
Activity