Skip to content

Commit

Permalink
Change sub to use saturating sub
Browse files Browse the repository at this point in the history
  • Loading branch information
Gauthamastro committed Mar 19, 2024
1 parent f6e9a96 commit 163e2b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pallets/ocex/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1530,7 +1530,7 @@ pub mod pallet {
);
let fee_to_be_burnt =
Percent::from_percent(distribution.burn_ration) * fees;
let fee_to_be_distributed = fees - fee_to_be_burnt;
let fee_to_be_distributed = fees.saturating_sub(fee_to_be_burnt);
// Burn the fee
let imbalance = T::NativeCurrency::burn(
fee_to_be_burnt.saturated_into(),
Expand Down

0 comments on commit 163e2b4

Please sign in to comment.