Skip to content
This repository has been archived by the owner on Apr 19, 2019. It is now read-only.

Commit

Permalink
Fix imported private key wallet bug ( #6 #7 )
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Lundeberg committed Dec 28, 2018
1 parent 1863900 commit 52a1b53
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gui/qt/coinsplit.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ def __init__(self, main_window, address, password):
self.default_redeem_address = self.wallet.get_unused_address()
self.entropy_address = self.wallet.get_addresses()[0]

if not self.default_redeem_address:
# self.wallet.get_unused_address() returns None for imported privkey wallets.
self.close()
self.main_window.show_error(_("For imported private key wallets, please open the coin splitter from the Addresses tab by right clicking on an address, instead of via the Tools menu."))
return

# Extract private key
index = self.wallet.get_address_index(self.entropy_address)
try:
Expand Down
6 changes: 6 additions & 0 deletions gui/qt/coinsplitmul.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ def __init__(self, main_window, address, password):
self.default_redeem_address = self.wallet.get_unused_address()
self.entropy_address = self.wallet.get_addresses()[0]

if not self.default_redeem_address:
# self.wallet.get_unused_address() returns None for imported privkey wallets.
self.close()
self.main_window.show_error(_("For imported private key wallets, please open the coin splitter from the Addresses tab by right clicking on an address, instead of via the Tools menu."))
return

# Extract private key
index = self.wallet.get_address_index(self.entropy_address)
try:
Expand Down

0 comments on commit 52a1b53

Please sign in to comment.