]> Untitled Git - bdk/commit
feat(wallet)!: add persister (`P`) type param to `PersistedWallet<P>`
author志宇 <hello@evanlinjin.me>
Thu, 15 Aug 2024 05:49:18 +0000 (05:49 +0000)
committer志宇 <hello@evanlinjin.me>
Thu, 15 Aug 2024 05:54:34 +0000 (05:54 +0000)
commit960029324d18dbb51408034efc05b0450867c15a
treed537e584fe2c001edab03791f391b47f741d4483
parent06160574ba3997fa49449a251a8bc046fb1a96a5
feat(wallet)!: add persister (`P`) type param to `PersistedWallet<P>`

This forces the caller to use the same persister type that they used for
loading/creating when calling `.persist` on `PersistedWallet`.

This is not totally fool-proof since we can have multiple instances of
the same persister type persisting to different databases. However, it
does further enforce some level of safety.
crates/wallet/src/wallet/params.rs
crates/wallet/src/wallet/persisted.rs
crates/wallet/tests/wallet.rs