From 61f5e1df61c833b0e11a77561c0a84605d1cc9ab Mon Sep 17 00:00:00 2001 From: ZuluCrypto Date: Fri, 20 Apr 2018 10:34:26 -0600 Subject: [PATCH] stellar.py now returns a tuple from parse_transaction_bytes and no longer uses a reserved argument name --- trezorlib/stellar.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/trezorlib/stellar.py b/trezorlib/stellar.py index 62278cbe29..e235a13245 100644 --- a/trezorlib/stellar.py +++ b/trezorlib/stellar.py @@ -63,7 +63,7 @@ def address_to_public_key(address_str): return decoded[1:-2] -def parse_transaction_bytes(bytes): +def parse_transaction_bytes(tx_bytes): """Parses base64data into a map with the following keys: tx - a StellarSignTx describing the transaction header operations - an array of protobuf message objects for each operation @@ -72,7 +72,7 @@ def parse_transaction_bytes(bytes): protocol_version=1 ) operations = [] - unpacker = xdrlib.Unpacker(bytes) + unpacker = xdrlib.Unpacker(tx_bytes) tx.source_account = _xdr_read_address(unpacker) tx.fee = unpacker.unpack_uint() @@ -108,10 +108,7 @@ def parse_transaction_bytes(bytes): for i in range(tx.num_operations): operations.append(_parse_operation_bytes(unpacker)) - return { - "tx": tx, - "operations": operations - } + return tx, operations def _parse_operation_bytes(unpacker): """Returns a protobuf message representing the next operation as read from