Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: evm fee debug assertion #780

Merged
merged 2 commits into from
Mar 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions runtime/hydradx/src/evm/evm_fee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ where
let result = MC::mint_into(paid.asset_id, &account_id, refund_amount);

let refund_imbalance = if let Ok(amount) = result {
// just in case of partial refund
// we are not expecting any imbalance, let's try to catch it in debug
debug_assert_eq!(amount, 0);
// Ensure that we minted all amount, in case of partial refund for some reason,
// refund the difference back to treasury
debug_assert_eq!(amount, refund_amount);
refund_amount.saturating_sub(amount)
} else {
// If error, we refund the whole amount back to treasury
Expand Down
Loading