mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-13 08:50:56 +00:00
python: improve ethereum_sign_tx
This commit is contained in:
parent
2d4b23d64a
commit
ab74f55a95
@ -56,22 +56,16 @@ def sign_tx(
|
||||
gas_price=int_to_big_endian(gas_price),
|
||||
gas_limit=int_to_big_endian(gas_limit),
|
||||
value=int_to_big_endian(value),
|
||||
to=to,
|
||||
chain_id=chain_id,
|
||||
tx_type=tx_type,
|
||||
)
|
||||
|
||||
if to:
|
||||
msg.to = to
|
||||
|
||||
if data:
|
||||
msg.data_length = len(data)
|
||||
data, chunk = data[1024:], data[:1024]
|
||||
msg.data_initial_chunk = chunk
|
||||
|
||||
if chain_id:
|
||||
msg.chain_id = chain_id
|
||||
|
||||
if tx_type is not None:
|
||||
msg.tx_type = tx_type
|
||||
|
||||
response = client.call(msg)
|
||||
|
||||
while response.data_length is not None:
|
||||
|
Loading…
Reference in New Issue
Block a user