Skip to content

Commit

Permalink
Namecoin: Fix name_new transactions being recognized as transfers
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyRand committed Oct 1, 2018
1 parent d774840 commit 18e43bd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion electrum_nmc/names.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ def get_default_name_tx_label(wallet, tx):
if name_input_is_mine and not name_output_is_mine:
return "Name Transfer (Outgoing)"
if not name_input_is_mine and name_output_is_mine:
return "Name Transfer (Incoming)"
# A name_new transaction isn't expected to have a name input,
# so we don't consider it a transfer.
if name_op["op"] != OP_NAME_NEW:
return "Name Transfer (Incoming)"
if name_op["op"] == OP_NAME_NEW:
return "Name Pre-Registration"
if name_op["op"] == OP_NAME_FIRSTUPDATE:
Expand Down

0 comments on commit 18e43bd

Please sign in to comment.