diff --git a/bitcoinetl/mappers/transaction_output_mapper.py b/bitcoinetl/mappers/transaction_output_mapper.py index 6974006..3ce8011 100644 --- a/bitcoinetl/mappers/transaction_output_mapper.py +++ b/bitcoinetl/mappers/transaction_output_mapper.py @@ -46,7 +46,11 @@ def json_dict_to_output(self, json_dict): output.script_hex = script_pub_key.get('hex') output.required_signatures = script_pub_key.get('reqSigs') output.type = script_pub_key.get('type') - output.addresses = script_pub_key.get('addresses') + #output.addresses = script_pub_key.get('addresses') + if script_pub_key.get('address') is None: + output.addresses = [] + else: + output.addresses = [script_pub_key.get('address')] return output diff --git a/bitcoinetl/service/btc_service.py b/bitcoinetl/service/btc_service.py index d768618..d4e9408 100644 --- a/bitcoinetl/service/btc_service.py +++ b/bitcoinetl/service/btc_service.py @@ -156,7 +156,9 @@ def _remove_coinbase_input(self, block): def _add_non_standard_addresses(self, transaction): for output in transaction.outputs: if output.addresses is None or len(output.addresses) == 0: - output.type = 'nonstandard' + #output.type = 'nonstandard' + if output.type != 'multisig': + output.type = 'nonstandard' output.addresses = [script_hex_to_non_standard_address(output.script_hex)] def _add_shielded_inputs_and_outputs(self, transaction):