Skip to content

Commit

Permalink
fix sha
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed Feb 20, 2024
1 parent d5aca21 commit 954d6c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
10 changes: 4 additions & 6 deletions integration_tests/eip712_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,8 @@ def create_transaction_with_multiple_messages(
account_number,
)

hash_amino = keccak()
hash_amino.update(sig_doc_amino.SerializeToString())
to_sign_amino = hash_amino.hexdigest()
hash_amino = keccak.new(sig_doc_amino.SerializeToString())
to_sign_amino = hash_amino.digest()

# SignDirect
sig_info_direct = create_signer_info(
Expand All @@ -230,9 +229,8 @@ def create_transaction_with_multiple_messages(
chain_id,
account_number,
)
hash_direct = keccak()
hash_direct.update(sign_doc_direct.SerializeToString())
to_sign_direct = hash_direct.hexdigest()
hash_direct = keccak.new(sign_doc_direct.SerializeToString())
to_sign_direct = hash_direct.digest()
return {
"legacyAmino": {
"body": body,
Expand Down
5 changes: 2 additions & 3 deletions integration_tests/gravity_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,10 @@ def prepare_gravity(custom_cronos, custom_geth):
print("gravity contract deployed", contract.address)

# make all the orchestrator "Relayer" roles
k_relayer = keccak()
k_relayer.update(b"RELAYER")
k_relayer = keccak.new(b"RELAYER")
for _, address in enumerate(eth_addresses):
set_role_tx = contract.functions.grantRole(
k_relayer.hexdigest(), address
k_relayer.digest(), address
).build_transaction({"from": admin.address})
set_role_receipt = send_transaction(w3, set_role_tx, admin.key)
print("set_role_tx", set_role_receipt)
Expand Down

0 comments on commit 954d6c3

Please sign in to comment.