1
0

kivy: when pressing "max" button, catch NoDynamicFeeEstimates

This commit is contained in:
SomberNight
2018-06-08 18:55:25 +02:00
parent 208606beda
commit cad8e29ed7

View File

@@ -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())