Browse Source

do not show send from menu for addresses that have no coins

283
ThomasV 11 years ago
parent
commit
1189ed39ae
  1. 4
      gui/qt/main_window.py

4
gui/qt/main_window.py

@ -1373,7 +1373,9 @@ class ElectrumWindow(QMainWindow):
if any(addr in self.wallet.frozen_addresses for addr in addrs):
menu.addAction(_("Unfreeze"), lambda: self.set_addrs_frozen(addrs, False))
if any(addr not in self.wallet.frozen_addresses for addr in addrs):
def can_send(addr):
return addr not in self.wallet.frozen_addresses and self.wallet.get_addr_balance(addr) != (0, 0)
if any(can_send(addr) for addr in addrs):
menu.addAction(_("Send From"), lambda: self.send_from_addresses(addrs))
run_hook('receive_menu', menu, addrs)

Loading…
Cancel
Save