Skip to content

Commit

Permalink
hot fix for taproot
Browse files Browse the repository at this point in the history
  • Loading branch information
Prasanna authored and Prasanna committed Dec 16, 2021
1 parent a9be6f2 commit bcc931b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions bitcoinetl/mappers/transaction_output_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@ def json_dict_to_output(self, json_dict, create_transaction_id=None):
output.required_signatures = script_pub_key.get('reqSigs')
output.type = script_pub_key.get('type')
#output.addresses = script_pub_key.get('addresses')
if script_pub_key.get('address') is None:
output.addresses = []
if script_pub_key.get('addresses') is not None and len(script_pub_key.get('addresses')) > 0:
output.addresses = script_pub_key.get('addresses')
elif script_pub_key.get('address') is None:
output.addresses = []
else:
output.addresses = [script_pub_key.get('address')]
output.addresses = [script_pub_key.get('address')]

return output

Expand Down
4 changes: 2 additions & 2 deletions bitcoinetl/service/btc_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ 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'
if output.type != 'multisig':
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):
Expand Down

0 comments on commit bcc931b

Please sign in to comment.