commit 5f590c9c648fd2c7b859f1aebd356dafab4a761f
parent c57ed0c212ce6d9004503b85587515f13239c235
Author: Neil Booth <kyuupichan@gmail.com>
Date: Sat, 13 Feb 2016 15:40:34 +0900
2 fee colour fixes
update_fee() if removing an item from send_from
update not_enough_funds when pressing !
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py
@@ -1007,12 +1007,14 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
def on_shortcut():
inputs = self.get_coins()
+ sendable = sum(map(lambda x:x['value'], inputs))
fee = self.fee_e.get_amount() if self.fee_e.isModified() else None
addr = self.get_payto_or_dummy()
amount, fee = self.wallet.get_max_amount(self.config, inputs, addr, fee)
if not self.fee_e.isModified():
self.fee_e.setAmount(fee)
- self.amount_e.setAmount(max(0, amount))
+ self.amount_e.setAmount(amount)
+ self.not_enough_funds = (fee + amount > sendable)
# emit signal for fiat_amount update
self.amount_e.textEdited.emit("")
@@ -1114,6 +1116,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
i = self.from_list.indexOfTopLevelItem(item)
self.pay_from.pop(i)
self.redraw_from_list()
+ self.update_fee()
def from_list_menu(self, position):
item = self.from_list.itemAt(position)