From 4242f2b59ba7ef0e2ff5d1395a22f3a86752c666 Mon Sep 17 00:00:00 2001 From: Gabe Rodriguez Date: Thu, 14 Sep 2023 18:48:35 +0200 Subject: [PATCH] Forget unless delegation token --- crates/view/src/storage.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/crates/view/src/storage.rs b/crates/view/src/storage.rs index 317d577334..fc8df25efa 100644 --- a/crates/view/src/storage.rs +++ b/crates/view/src/storage.rs @@ -1352,20 +1352,14 @@ impl Storage { // which must be saved to allow voting on proposals that might or might not be // open presently - if DelegationToken::from_str(&spent_denom).is_ok() { + if DelegationToken::from_str(&spent_denom).is_err() { new_sct.forget(spent_commitment); } }; // Mark spent swaps as spent if let Some(spent_swap_commitment) = swap_commitment { - // Forget spent swap commitments from the SCT unless they are delegation tokens, - // which must be saved to allow voting on proposals that might or might not be open - // presently - - if DelegationToken::from_str(&spent_denom).is_ok() { - new_sct.forget(spent_swap_commitment); - } + new_sct.forget(spent_swap_commitment); }; }