1
0

qt tx dialog: small fee edit fix

scenario: enter extremely high feerate (which we cannot satisfy) then click into fee_edit.
At that moment, fee_edit is empty and both feerate_edit and fee_edit are considered frozen.
As fee_edit has priority, we would construct a tx with default fee.
Now, instead, we won't construct this default fee tx ~as if the click to fee_edit did not happen.
This commit is contained in:
SomberNight
2019-11-19 19:29:10 +01:00
parent 8bd27851a4
commit 66ddedb97e
3 changed files with 5 additions and 4 deletions

View File

@@ -642,7 +642,7 @@ def format_fee_satoshis(fee, *, num_zeros=0, precision=None):
return format_satoshis(fee, num_zeros=num_zeros, decimal_point=0, precision=precision)
def quantize_feerate(fee):
def quantize_feerate(fee) -> Union[None, Decimal, int]:
"""Strip sat/byte fee rate of excess precision."""
if fee is None:
return None