Skip to content

Commit

Permalink
Namecoin: Add wallet arg to name command usage in GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyRand committed Feb 17, 2020
1 parent b4252a9 commit 8f57aa8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions electrum_nmc/electrum/gui/qt/configure_name_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def __init__(self, identifier, value, parent, is_new):
QDialog.__init__(self, parent=None)

self.main_window = parent
self.wallet = self.main_window.wallet

self.setMinimumWidth(545)
self.setMinimumHeight(245)
Expand Down Expand Up @@ -152,7 +153,7 @@ def register_and_broadcast(self, identifier, value, transfer_to):

try:
# TODO: support non-ASCII encodings
name_autoregister(identifier.decode('ascii'), value.decode('ascii'), recipient_address)
name_autoregister(identifier.decode('ascii'), value.decode('ascii'), destination=recipient_address, wallet=self.wallet)
except NameAlreadyExistsError as e:
self.main_window.show_message(_("Error registering ") + formatted_name + ": " + str(e))
return
Expand Down Expand Up @@ -199,7 +200,7 @@ def update_and_broadcast(self, identifier, value, transfer_to):

try:
# TODO: support non-ASCII encodings
tx = name_update(identifier.decode('ascii'), value.decode('ascii'), recipient_address)['hex']
tx = name_update(identifier.decode('ascii'), value.decode('ascii'), destination=recipient_address, wallet=self.wallet)['hex']
except (NotEnoughFunds, NoDynamicFeeEstimates) as e:
formatted_name = format_name_identifier(identifier)
self.main_window.show_message(_("Error creating update for ") + formatted_name + ": " + str(e))
Expand Down
2 changes: 1 addition & 1 deletion electrum_nmc/electrum/gui/qt/uno_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def renew_selected_items(self):

try:
# TODO: support non-ASCII encodings
tx = name_update(identifier.decode('ascii'))['hex']
tx = name_update(identifier.decode('ascii'), wallet=self.wallet)['hex']
except NameUpdatedTooRecentlyError:
# The name was recently updated, so skip it and don't renew.
continue
Expand Down

0 comments on commit 8f57aa8

Please sign in to comment.