Browse Source

message about frozen funds

283
thomasv 12 years ago
parent
commit
6585da69fe
  1. 2
      gui/gui_classic.py
  2. 9
      lib/wallet.py

2
gui/gui_classic.py

@ -745,6 +745,8 @@ class ElectrumWindow(QMainWindow):
palette.setColor(self.amount_e.foregroundRole(), QColor('red')) palette.setColor(self.amount_e.foregroundRole(), QColor('red'))
self.funds_error = True self.funds_error = True
text = _( "Not enough funds" ) text = _( "Not enough funds" )
c, u = self.wallet.get_frozen_balance()
if c+u: text += ' (' + self.format_amount(c+u).strip() + self.base_unit() + ' ' +_("are frozen") + ')'
self.statusBar().showMessage(text) self.statusBar().showMessage(text)
self.amount_e.setPalette(palette) self.amount_e.setPalette(palette)

9
lib/wallet.py

@ -521,6 +521,15 @@ class Wallet:
unconf += u unconf += u
return conf, unconf return conf, unconf
def get_frozen_balance(self):
conf = unconf = 0
for addr in self.frozen_addresses:
c, u = self.get_addr_balance(addr)
conf += c
unconf += u
return conf, unconf
def get_balance(self): def get_balance(self):
cc = uu = 0 cc = uu = 0
for a in self.accounts.keys(): for a in self.accounts.keys():

Loading…
Cancel
Save