kivy: when pressing "max" button, catch NoDynamicFeeEstimates
This commit is contained in:
parent
208606beda
commit
cad8e29ed7
@ -67,7 +67,7 @@ Label.register('Roboto',
|
|||||||
'gui/kivy/data/fonts/Roboto-Bold.ttf')
|
'gui/kivy/data/fonts/Roboto-Bold.ttf')
|
||||||
|
|
||||||
|
|
||||||
from electrum.util import base_units
|
from electrum.util import base_units, NoDynamicFeeEstimates
|
||||||
|
|
||||||
|
|
||||||
class ElectrumWindow(App):
|
class ElectrumWindow(App):
|
||||||
@ -668,7 +668,11 @@ class ElectrumWindow(App):
|
|||||||
return ''
|
return ''
|
||||||
addr = str(self.send_screen.screen.address) or self.wallet.dummy_address()
|
addr = str(self.send_screen.screen.address) or self.wallet.dummy_address()
|
||||||
outputs = [(TYPE_ADDRESS, addr, '!')]
|
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()
|
amount = tx.output_value()
|
||||||
return format_satoshis_plain(amount, self.decimal_point())
|
return format_satoshis_plain(amount, self.decimal_point())
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user