diff --git a/esdt-safe/src/lib.rs b/esdt-safe/src/lib.rs index a2ccc3bb..723d25e2 100644 --- a/esdt-safe/src/lib.rs +++ b/esdt-safe/src/lib.rs @@ -260,11 +260,7 @@ pub trait EsdtSafe: }; let batch_id = self.add_to_batch(tx.clone()); - if !self.mint_burn_token(&payment_token).get() { - self.total_balances(&payment_token).update(|total| { - *total += &actual_bridged_amount; - }); - } else { + if self.mint_burn_token(&payment_token).get() { let burn_balances_mapper = self.burn_balances(&payment_token); let mint_balances_mapper = self.mint_balances(&payment_token); if !self.native_token(&payment_token).get() { @@ -279,6 +275,10 @@ pub trait EsdtSafe: burn_balances_mapper.update(|burned| { *burned += &actual_bridged_amount; }); + } else { + self.total_balances(&payment_token).update(|total| { + *total += &actual_bridged_amount; + }); } self.create_transaction_event( batch_id,