Skip to content

Commit

Permalink
eth: omit type parameter for legacy transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
mrnerdhair committed Sep 10, 2021
1 parent 1584e53 commit 9262336
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions keepkeylib/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ def ethereum_sign_tx(self, n, nonce, gas_limit, value, gas_price=None, max_fee_
value=int_to_big_endian(value),
to_address_n=to_n,
address_type=address_type,
type=2 if max_fee_per_gas else 0
type=2 if max_fee_per_gas else None
)
elif address_type == types.EXCHANGE: #Ethereum exchange transaction
msg = proto.EthereumSignTx(
Expand All @@ -605,7 +605,7 @@ def ethereum_sign_tx(self, n, nonce, gas_limit, value, gas_price=None, max_fee_
to_address_n=to_n,
exchange_type=exchange_type,
address_type=address_type,
type=2 if max_fee_per_gas else 0
type=2 if max_fee_per_gas else None
)
else:
msg = proto.EthereumSignTx(
Expand All @@ -616,7 +616,7 @@ def ethereum_sign_tx(self, n, nonce, gas_limit, value, gas_price=None, max_fee_
max_fee_per_gas=int_to_big_endian(max_fee_per_gas) if max_fee_per_gas else None,
max_priority_fee_per_gas=int_to_big_endian(max_priority_fee_per_gas) if max_priority_fee_per_gas else None,
value=int_to_big_endian(value),
type=2 if max_fee_per_gas else 0
type=2 if max_fee_per_gas else None
)

if to:
Expand Down

0 comments on commit 9262336

Please sign in to comment.