Skip to content

Commit

Permalink
Forget unless delegation token
Browse files Browse the repository at this point in the history
  • Loading branch information
grod220 authored and hdevalence committed Sep 22, 2023
1 parent ecadf3b commit 4242f2b
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions crates/view/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
}

Expand Down

0 comments on commit 4242f2b

Please sign in to comment.