Skip to content

Commit

Permalink
pindexer: supply: fix bug with undelegation
Browse files Browse the repository at this point in the history
  • Loading branch information
cronokirby committed Sep 20, 2024
1 parent 6b7c24d commit 46e0c78
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions crates/bin/pindexer/src/indexer_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ impl IndexerExt for cometindex::Indexer {
.with_index(crate::stake::UndelegationTxs {})
.with_index(crate::governance::GovernanceProposals {})
.with_index(crate::dex::Component::new())
.with_index(crate::supply::Supply::new())
}
}
4 changes: 2 additions & 2 deletions crates/bin/pindexer/src/supply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ impl DelegatedSupply {
Self {
um: self
.um
.checked_add(um_delta)
.checked_sub(um_delta)
.ok_or(anyhow!("supply modification failed"))?,
del_um: self
.del_um
.checked_add(del_um_delta)
.checked_sub(del_um_delta)
.ok_or(anyhow!("supply modification failed"))?,
rate_bps2: self.rate_bps2,
}
Expand Down

0 comments on commit 46e0c78

Please sign in to comment.