do not revert to static fee when dynamic fee estimates are missing

This commit is contained in:
ThomasV 2017-03-02 11:10:28 +01:00
parent ddcdbfa181
commit 9dde9971da
2 changed files with 5 additions and 1 deletions

View File

@ -277,6 +277,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
elif event == 'fee': elif event == 'fee':
if self.config.is_dynfee(): if self.config.is_dynfee():
self.fee_slider.update() self.fee_slider.update()
self.do_update_fee()
else: else:
self.print_error("unexpected network_qt signal:", event, args) self.print_error("unexpected network_qt signal:", event, args)
@ -1114,6 +1115,9 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
'''Recalculate the fee. If the fee was manually input, retain it, but '''Recalculate the fee. If the fee was manually input, retain it, but
still build the TX to see if there are enough funds. still build the TX to see if there are enough funds.
''' '''
if self.config.is_dynfee() and not self.config.has_fee_estimates():
self.statusBar().showMessage(_('Waiting for fee estimates...'))
return False
freeze_fee = (self.fee_e.isModified() freeze_fee = (self.fee_e.isModified()
and (self.fee_e.text() or self.fee_e.hasFocus())) and (self.fee_e.text() or self.fee_e.hasFocus()))
amount = '!' if self.is_max else self.amount_e.get_amount() amount = '!' if self.is_max else self.amount_e.get_amount()

View File

@ -222,7 +222,7 @@ class SimpleConfig(PrintError):
return len(self.fee_estimates)==4 return len(self.fee_estimates)==4
def is_dynfee(self): def is_dynfee(self):
return self.get('dynamic_fees') and self.has_fee_estimates() return self.get('dynamic_fees')
def fee_per_kb(self): def fee_per_kb(self):
dyn = self.is_dynfee() dyn = self.is_dynfee()