commit cad8e29ed778cc53480bfecfa0acfcac4c210535
parent 208606beda445c243620727c68ad19b85e47ada2
Author: SomberNight <somber.night@protonmail.com>
Date: Fri, 8 Jun 2018 18:55:25 +0200
kivy: when pressing "max" button, catch NoDynamicFeeEstimates
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/gui/kivy/main_window.py b/gui/kivy/main_window.py
@@ -67,7 +67,7 @@ Label.register('Roboto',
'gui/kivy/data/fonts/Roboto-Bold.ttf')
-from electrum.util import base_units
+from electrum.util import base_units, NoDynamicFeeEstimates
class ElectrumWindow(App):
@@ -668,7 +668,11 @@ class ElectrumWindow(App):
return ''
addr = str(self.send_screen.screen.address) or self.wallet.dummy_address()
outputs = [(TYPE_ADDRESS, addr, '!')]
- tx = self.wallet.make_unsigned_transaction(inputs, outputs, self.electrum_config)
+ try:
+ tx = self.wallet.make_unsigned_transaction(inputs, outputs, self.electrum_config)
+ except NoDynamicFeeEstimates as e:
+ Clock.schedule_once(lambda dt, bound_e=e: self.show_error(str(bound_e)))
+ return ''
amount = tx.output_value()
return format_satoshis_plain(amount, self.decimal_point())