mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-23 15:44:50 +01:00
feat(cdk_sdk):remove spent proof and update db state (#393)
This commit is contained in:
committed by
GitHub
parent
260f262c39
commit
ef3ecce3cf
@@ -111,6 +111,16 @@ impl Wallet {
|
|||||||
.collect::<Result<Vec<PublicKey>, _>>()?,
|
.collect::<Result<Vec<PublicKey>, _>>()?,
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
let spent_ys: Vec<_> = spendable
|
||||||
|
.states
|
||||||
|
.iter()
|
||||||
|
.filter_map(|p| match p.state {
|
||||||
|
State::Spent => Some(p.y),
|
||||||
|
_ => None,
|
||||||
|
})
|
||||||
|
.collect();
|
||||||
|
|
||||||
|
self.localstore.update_proofs(vec![], spent_ys).await?;
|
||||||
|
|
||||||
Ok(spendable.states)
|
Ok(spendable.states)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user