1
0

factor out hardcoded "sat/byte" and "sat/b" strings

Though note that the qml GUI has some more in qml/js context.
This commit is contained in:
SomberNight
2024-02-03 04:18:46 +00:00
parent 16eec8daf5
commit 13a421aabb
5 changed files with 10 additions and 8 deletions

View File

@@ -792,6 +792,8 @@ def format_satoshis(
FEERATE_PRECISION = 1 # num fractional decimal places for sat/byte fee rates
_feerate_quanta = Decimal(10) ** (-FEERATE_PRECISION)
FEERATE_UI_NAME_SAT_PER_VBYTE = "sat/byte"
FEERATE_UI_NAME_SAT_PER_VBYTE_SHORT = "sat/b"
def format_fee_satoshis(fee, *, num_zeros=0, precision=None):