1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-21 13:58:08 +00:00

feat(core): add read_uint64_le to common/readers

- will be needed for solana tx parsing
This commit is contained in:
gabrielkerekes 2023-10-18 12:02:56 +02:00 committed by matejcik
parent b3f4b6ac2b
commit 081995788e

View File

@ -55,3 +55,8 @@ def read_uint16_le(r: BufferReader) -> int:
def read_uint32_le(r: BufferReader) -> int: def read_uint32_le(r: BufferReader) -> int:
data = r.read_memoryview(4) data = r.read_memoryview(4)
return int.from_bytes(data, "little") return int.from_bytes(data, "little")
def read_uint64_le(r: BufferReader) -> int:
data = r.read_memoryview(8)
return int.from_bytes(data, "little")