Skip to content

Commit

Permalink
feat: get check_signature to work with chain ID
Browse files Browse the repository at this point in the history
  • Loading branch information
johnson2427 committed May 7, 2024
1 parent a65abfb commit 90f07b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ape_aws/accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ def sign_transaction(
gas=txn.gas_limit,
to=txn.receiver,
value=txn.value,
data=txn.data
data=txn.data,
chainId=txn.chain_id
)
).hash()
msg_sig = self._sign_raw_hash(unsigned_txn)
Expand Down
3 changes: 2 additions & 1 deletion tests/test_accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@pytest.fixture(scope="session")
def transaction():
txn = {
# "chain_id": 11155111,
"chain_id": 11155111,
"nonce": 0,
"value": 1,
"data": '0x00',
Expand Down Expand Up @@ -44,4 +44,5 @@ def test_signing_message(kms_account, string_message):

def test_signing_transaction(kms_account, transaction):
val = kms_account.sign_transaction(transaction)
breakpoint()
assert isinstance(val.signature, TransactionSignature)

0 comments on commit 90f07b7

Please sign in to comment.