From 193e789d14459f0e076e4b4eb2589bd352f2b225 Mon Sep 17 00:00:00 2001 From: Divya-Solulab Date: Mon, 28 Oct 2024 16:04:23 +0530 Subject: [PATCH 1/2] fix: add from address in request --- plugins/aea-ledger-ethereum/aea_ledger_ethereum/ethereum.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/aea-ledger-ethereum/aea_ledger_ethereum/ethereum.py b/plugins/aea-ledger-ethereum/aea_ledger_ethereum/ethereum.py index dc9e4d9085..14f8e7e6e4 100644 --- a/plugins/aea-ledger-ethereum/aea_ledger_ethereum/ethereum.py +++ b/plugins/aea-ledger-ethereum/aea_ledger_ethereum/ethereum.py @@ -1003,6 +1003,7 @@ def get_transfer_transaction( # pylint: disable=arguments-differ if nonce is None: return transaction transaction = { + "from": sender_address, "nonce": nonce, "chainId": chain_id, "to": destination_address, From c6e5749a474c5a836c9cda4b5a6f290883314576 Mon Sep 17 00:00:00 2001 From: Divya-Solulab Date: Mon, 28 Oct 2024 18:01:43 +0530 Subject: [PATCH 2/2] fix: update unit tests --- plugins/aea-ledger-ethereum/tests/test_ethereum.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/aea-ledger-ethereum/tests/test_ethereum.py b/plugins/aea-ledger-ethereum/tests/test_ethereum.py index 1d616293e3..b5aeb29c3c 100644 --- a/plugins/aea-ledger-ethereum/tests/test_ethereum.py +++ b/plugins/aea-ledger-ethereum/tests/test_ethereum.py @@ -422,7 +422,7 @@ def test_ethereum_api_get_transfer_transaction_2(*args): "max_fee_per_gas": 10, } with patch.object(ethereum_api.api.eth, "estimate_gas", return_value=1): - assert len(ethereum_api.get_transfer_transaction(**args)) == 8 + assert len(ethereum_api.get_transfer_transaction(**args)) == 9 @patch.object(EthereumApi, "_try_get_transaction_count", return_value=1) @@ -441,7 +441,7 @@ def test_ethereum_api_get_transfer_transaction_3(*args): "max_fee_per_gas": 10, } with patch.object(ethereum_api.api.eth, "_max_priority_fee", return_value=1): - assert len(ethereum_api.get_transfer_transaction(**args)) == 8 + assert len(ethereum_api.get_transfer_transaction(**args)) == 9 def test_ethereum_api_get_deploy_transaction(ethereum_testnet_config):