fix: wallet.is_used

This commit is contained in:
ThomasV 2015-08-06 19:19:25 +02:00
parent 0201bdbb20
commit 714445aba8
2 changed files with 4 additions and 4 deletions

View File

@ -1703,7 +1703,8 @@ class ElectrumWindow(QMainWindow):
used_flag = False
addr_list = account.get_addresses(is_change)
for address in addr_list:
num, is_used = self.wallet.is_used(address)
num = len(self.wallet.history.get(address,[]))
is_used = self.wallet.is_used(address)
label = self.wallet.labels.get(address,'')
c, u, x = self.wallet.get_addr_balance(address)
balance = self.format_amount(c + u + x)

View File

@ -1128,7 +1128,7 @@ class Abstract_Wallet(object):
def is_used(self, address):
h = self.history.get(address,[])
c, u, x = self.get_addr_balance(address)
return len(h), len(h) > 0 and c + u + x == 0
return len(h) > 0 and c + u + x == 0
def is_empty(self, address):
c, u, x = self.get_addr_balance(address)
@ -1346,8 +1346,7 @@ class Imported_Wallet(Abstract_Wallet):
self.accounts[IMPORTED_ACCOUNT].get_private_key((0,0), self, password)
def is_used(self, address):
h = self.history.get(address,[])
return len(h), False
return False
def get_master_public_keys(self):
return {}