Format the transaction window fee rate with 1 decimal place (#4286)
* Fix format_satoshi to properly handle non-integer values Handling the integer and fraction parts together via string formatting simplifies the initial composition because the default behavior manages the - sign, and the incorporation of the fractional part. * Limit fee rate output to one decimal place Via a new precision arg * Introduce format_fee_satoshis and use it for all fee display
This commit is contained in:
@@ -671,7 +671,7 @@ class ElectrumWindow(App):
|
||||
return format_satoshis_plain(amount, self.decimal_point())
|
||||
|
||||
def format_amount(self, x, is_diff=False, whitespaces=False):
|
||||
return format_satoshis(x, is_diff, 0, self.decimal_point(), whitespaces)
|
||||
return format_satoshis(x, 0, self.decimal_point(), is_diff=is_diff, whitespaces=whitespaces)
|
||||
|
||||
def format_amount_and_units(self, x):
|
||||
return format_satoshis_plain(x, self.decimal_point()) + ' ' + self.base_unit
|
||||
|
||||
Reference in New Issue
Block a user