mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 23:48:12 +00:00
core/ripple: rename write_bytes to avoid name collision
This commit is contained in:
parent
64584e271c
commit
694f714719
@ -63,9 +63,9 @@ def write(w: bytearray, field: dict, value):
|
||||
elif field["type"] == FIELD_TYPE_AMOUNT:
|
||||
w.extend(serialize_amount(value))
|
||||
elif field["type"] == FIELD_TYPE_ACCOUNT:
|
||||
write_bytes(w, helpers.decode_address(value))
|
||||
write_bytes_varint(w, helpers.decode_address(value))
|
||||
elif field["type"] == FIELD_TYPE_VL:
|
||||
write_bytes(w, value)
|
||||
write_bytes_varint(w, value)
|
||||
else:
|
||||
raise ValueError("Unknown field type")
|
||||
|
||||
@ -91,7 +91,7 @@ def serialize_amount(value: int) -> bytearray:
|
||||
return b
|
||||
|
||||
|
||||
def write_bytes(w: bytearray, value: bytes):
|
||||
def write_bytes_varint(w: bytearray, value: bytes):
|
||||
"""Serialize a variable length bytes."""
|
||||
write_varint(w, len(value))
|
||||
w.extend(value)
|
||||
|
Loading…
Reference in New Issue
Block a user