From e7d24c31bd4965a4b9f4c86dd39cf4f887e89a9f Mon Sep 17 00:00:00 2001 From: ThomasV Date: Fri, 19 Sep 2014 11:14:16 +0200 Subject: [PATCH] don't set negative amounts in amount field --- gui/qt/main_window.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py index 0887d89b9..66059bc3b 100644 --- a/gui/qt/main_window.py +++ b/gui/qt/main_window.py @@ -933,7 +933,7 @@ class ElectrumWindow(QMainWindow): output = ('address', addr, sendable) dummy_tx = Transaction(inputs, [output]) fee = self.wallet.estimated_fee(dummy_tx) - self.amount_e.setAmount(sendable-fee) + self.amount_e.setAmount(max(0,sendable-fee)) self.amount_e.textEdited.emit("") self.fee_e.setAmount(fee)