commit 792c248919c8c53e93a70340c46f669d34d99bed
parent 9788ca025066ba14fa1dd2fb83e5bce765ddfac7
Author: SomberNight <somber.night@protonmail.com>
Date: Mon, 4 Jun 2018 21:17:25 +0200
Qt: FeerateEdit.get_amount now returns sat/byte
Diffstat:
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/gui/qt/amountedit.py b/gui/qt/amountedit.py
@@ -121,9 +121,7 @@ class FeerateEdit(BTCAmountEdit):
def get_amount(self):
sat_per_byte_amount = BTCAmountEdit.get_amount(self)
- if sat_per_byte_amount is None:
- return None
- return 1000 * sat_per_byte_amount
+ return quantize_feerate(sat_per_byte_amount)
def setAmount(self, amount):
amount = quantize_feerate(amount)
diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py
@@ -1338,7 +1338,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
if freeze_feerate or self.fee_slider.is_active():
displayed_feerate = self.feerate_e.get_amount()
if displayed_feerate:
- displayed_feerate = quantize_feerate(displayed_feerate / 1000)
+ displayed_feerate = quantize_feerate(displayed_feerate)
else:
# fallback to actual fee
displayed_feerate = quantize_feerate(fee / size) if fee is not None else None
@@ -1438,8 +1438,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
if self.is_send_fee_frozen():
fee_estimator = self.fee_e.get_amount()
elif self.is_send_feerate_frozen():
- amount = self.feerate_e.get_amount()
- amount = 0 if amount is None else amount
+ amount = self.feerate_e.get_amount() # sat/byte feerate
+ amount = 0 if amount is None else amount * 1000 # sat/kilobyte feerate
fee_estimator = partial(
simple_config.SimpleConfig.estimate_fee_for_feerate, amount)
else: