1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-27 01:48:17 +00:00

stellar.py - fix incorrect constants

This commit is contained in:
ZuluCrypto 2018-06-27 01:19:37 -06:00 committed by matejcik
parent 4628327789
commit 8a284c03d1

View File

@ -21,9 +21,10 @@ import xdrlib
from . import messages as proto from . import messages as proto
# Memo types # Memo types
MEMO_TYPE_TEXT = 0 MEMO_TYPE_NONE = 0
MEMO_TYPE_ID = 1 MEMO_TYPE_TEXT = 1
MEMO_TYPE_HASH = 2 MEMO_TYPE_ID = 2
MEMO_TYPE_HASH = 3
MEMO_TYPE_RETURN = 4 MEMO_TYPE_RETURN = 4
# Asset types # Asset types
@ -104,7 +105,7 @@ def parse_transaction_bytes(tx_bytes):
tx.memo_type = unpacker.unpack_uint() tx.memo_type = unpacker.unpack_uint()
# text # text
if tx.memo_type == MEMO_TYPE_HASH: if tx.memo_type == MEMO_TYPE_TEXT:
tx.memo_text = unpacker.unpack_string() tx.memo_text = unpacker.unpack_string()
# id (64-bit uint) # id (64-bit uint)
if tx.memo_type == MEMO_TYPE_ID: if tx.memo_type == MEMO_TYPE_ID: