tfollow-up #4324 - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit f12798e91c158275f910946c327d21f67e111e8c DIR parent 150cbb5d9cf4b03549969dec616e09a6b2967387 HTML Author: SomberNight <somber.night@protonmail.com> Date: Mon, 14 May 2018 17:49:17 +0200 follow-up #4324 Diffstat: M lib/simple_config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- DIR diff --git a/lib/simple_config.py b/lib/simple_config.py t@@ -9,7 +9,7 @@ from copy import deepcopy from . import util from .util import (user_dir, print_error, PrintError, - NoDynamicFeeEstimates, format_fee_satoshis) + NoDynamicFeeEstimates, format_fee_satoshis, quantize_feerate) from .i18n import _ FEE_ETA_TARGETS = [25, 10, 5, 2] t@@ -476,6 +476,9 @@ class SimpleConfig(PrintError): def estimate_fee_for_feerate(cls, fee_per_kb, size): fee_per_kb = Decimal(fee_per_kb) fee_per_byte = fee_per_kb / 1000 + # to be consistent with what is displayed in the GUI, + # the calculation needs to use the same precision: + fee_per_byte = quantize_feerate(fee_per_byte) return round(fee_per_byte * size) def update_fee_estimates(self, key, value):