Skip to content

Commit

Permalink
Namecoin: Set default TxOutput name_op to None
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyRand committed Oct 1, 2018
1 parent 7697804 commit 4f83182
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions electrum_nmc/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ class MalformedBitcoinScript(Exception):

TxOutput = NamedTuple("TxOutput", [('type', int), ('address', str), ('value', Union[int, str]), ("name_op", dict)])
# ^ value is str when the output is set to max: '!'
TxOutput.__new__.__defaults__ = (None,)
# Assume no name_op if one wasn't provided; this reduces merge conflicts from
# upstream Electrum. Based on https://stackoverflow.com/a/18348004 .


TxOutputHwInfo = NamedTuple("TxOutputHwInfo", [('address_index', Tuple),
Expand Down

0 comments on commit 4f83182

Please sign in to comment.