Skip to content

Commit

Permalink
fix(eth): remove my_address from sign_and_send_transaction_with_keypa…
Browse files Browse the repository at this point in the history
…ir (#2115)

`sign_and_send_transaction_with_keypair` now uses the address provided from the caller instead of having `my_address` inside it.
  • Loading branch information
shamardy authored May 9, 2024
1 parent 9a82349 commit f4b2403
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mm2src/coins/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2355,11 +2355,10 @@ async fn sign_and_send_transaction_with_keypair(
data: Vec<u8>,
gas: U256,
) -> Result<SignedEthTx, TransactionErr> {
let my_address = try_tx_s!(coin.derivation_method.single_addr_or_err().await);
let address_lock = coin.get_address_lock(my_address.to_string()).await;
let address_lock = coin.get_address_lock(address.to_string()).await;
let _nonce_lock = address_lock.lock().await;
let (signed, web3_instances_with_latest_nonce) =
sign_transaction_with_keypair(coin, key_pair, value, action, data, gas, my_address).await?;
sign_transaction_with_keypair(coin, key_pair, value, action, data, gas, address).await?;
let bytes = Bytes(rlp::encode(&signed).to_vec());
info!(target: "sign-and-send", "send_raw_transaction…");

Expand Down

0 comments on commit f4b2403

Please sign in to comment.