1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-30 03:18:20 +00:00

stellar - _xdr_read_address now returns string instead of bytes

This commit is contained in:
ZuluCrypto 2018-06-23 20:54:58 -06:00 committed by matejcik
parent cc6cc49999
commit 6afaa41616

View File

@ -304,15 +304,15 @@ def _xdr_read_asset(unpacker):
def _xdr_read_address(unpacker):
"""Reads a stellar address and returns the 32-byte
data representing the address
"""Reads a stellar address and returns the string representing the address
This method assumes the encoded address is a public address (starting with G)
"""
# First 4 bytes are the address type
address_type = unpacker.unpack_uint()
if address_type != 0:
raise ValueError("Unsupported address type")
return unpacker.unpack_fopaque(32)
return address_from_public_key(unpacker.unpack_fopaque(32))
def _crc16_checksum(bytes):