electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 1189ed39ae99e960f0e79582976400c64f408a02
parent 03b0e5562577f4fcfb39ca725be8ba9a41e0bd05
Author: ThomasV <thomasv@gitorious>
Date:   Mon, 16 Jun 2014 17:42:47 +0200

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

Diffstat:
Mgui/qt/main_window.py | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gui/qt/main_window.py b/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)