Skip to content

Commit

Permalink
remove duplicate call
Browse files Browse the repository at this point in the history
  • Loading branch information
rmi7 committed Sep 21, 2021
1 parent e6bec53 commit 232f2d1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions etheno/jsonrpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ def hex_to_bytes(data: str) -> bytes:


def decode_raw_tx(raw_tx: str):
tx = rlp.decode(hex_to_bytes(raw_tx), Transaction)
hash_tx = Web3.toHex(keccak(hex_to_bytes(raw_tx)))
tx_bytes = hex_to_bytes(raw_tx)
tx = rlp.decode(tx_bytes, Transaction)
hash_tx = Web3.toHex(keccak(tx_bytes))
from_ = w3.eth.account.recover_transaction(raw_tx)
to = w3.toChecksumAddress(tx.to) if tx.to else None
data = w3.toHex(tx.data)
Expand Down

0 comments on commit 232f2d1

Please sign in to comment.