mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-14 03:30:02 +00:00
ethereum: do 'int_to_big_endian' conversion manually
instead of relying on 'rlp.utils' from which it was removed by 1.0, and moved to 'eth_utils' which don't support py3.4
This commit is contained in:
parent
41d99764c6
commit
4c06a613b5
@ -574,10 +574,7 @@ class ProtocolMixin(object):
|
||||
@session
|
||||
def ethereum_sign_tx(self, n, nonce, gas_price, gas_limit, to, value, data=None, chain_id=None, tx_type=None):
|
||||
def int_to_big_endian(value):
|
||||
import rlp.utils
|
||||
if value == 0:
|
||||
return b''
|
||||
return rlp.utils.int_to_big_endian(value)
|
||||
return value.to_bytes((value.bit_length() + 7) // 8, 'big')
|
||||
|
||||
n = self._convert_prime(n)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user