Skip to content

Commit 7d21b66

Browse files
committed
Alsoc orrect the Unvested staked total
1 parent eb98bae commit 7d21b66

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

althea-info-server/src/total_suppy.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ async fn compute_liquid_supply(
186186
// obvious stuff requiring no computation
187187
total_liquid_supply += user.unclaimed_rewards;
188188
total_liquid_supply += total_delegated_free;
189-
total_vesting_staked += total_delegated_vesting;
190189
total_nonvesting_staked += total_delegated_free;
191190

192191
// vesting has started
@@ -221,8 +220,11 @@ async fn compute_liquid_supply(
221220
// subtract it from what's vested so far and that's what's delegated and still vesting in this case
222221
let org_vest_bal = original_vesting_amount - total_delegated_vesting;
223222
let delegated_vesting = total_amount_vested - org_vest_bal;
223+
// updated total vesting staked with computed amount
224+
total_vesting_staked += delegated_vesting;
224225
total_amount_vested - delegated_vesting
225226
} else {
227+
total_vesting_staked += total_delegated_vesting;
226228
total_amount_still_vesting - total_delegated_vesting
227229
};
228230
// unvested tokens show up in the balance

0 commit comments

Comments
 (0)