Skip to content

Commit

Permalink
esdt-safe: Modify create_transaction_event
Browse files Browse the repository at this point in the history
  • Loading branch information
CostinCarabas committed Mar 14, 2024
1 parent bfaf454 commit 550f274
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions esdt-safe/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ pub trait EsdtSafe:
self.accumulated_transaction_fees(&payment_token)
.update(|fees| *fees += &required_fee);

let actual_bridged_amount = payment_amount - required_fee;
let actual_bridged_amount = payment_amount - required_fee.clone();
let caller = self.blockchain().get_caller();
let tx_nonce = self.get_and_save_next_tx_id();
let tx = Transaction {
Expand Down Expand Up @@ -240,7 +240,13 @@ pub trait EsdtSafe:
*burned += &actual_bridged_amount;
});
}
self.create_transaction_event(batch_id, tx_nonce, payment_token, actual_bridged_amount);
self.create_transaction_event(
batch_id,
tx_nonce,
payment_token,
actual_bridged_amount,
required_fee,
);
}

/// Claim funds for failed Elrond -> Ethereum transactions.
Expand Down Expand Up @@ -320,6 +326,7 @@ pub trait EsdtSafe:
#[indexed] tx_id: u64,
#[indexed] token_id: TokenIdentifier,
#[indexed] amount: BigUint,
#[indexed] fee: BigUint,
);

#[event("addRefundTransactionEvent")]
Expand Down

0 comments on commit 550f274

Please sign in to comment.