1
0

config: make adding thousand separators to amounts optional

This commit is contained in:
SomberNight
2021-07-28 15:18:15 +02:00
parent 9f5370f9c6
commit e7ccf1584e
2 changed files with 14 additions and 2 deletions

View File

@@ -111,6 +111,7 @@ class SimpleConfig(Logger):
self.decimal_point = DECIMAL_POINT_DEFAULT
self.num_zeros = int(self.get('num_zeros', 0))
self.amt_precision_post_satoshi = int(self.get('amt_precision_post_satoshi', 0))
self.amt_add_thousands_sep = bool(self.get('amt_add_thousands_sep', False))
def electrum_path(self):
# Read electrum_path from command line
@@ -659,7 +660,7 @@ class SimpleConfig(Logger):
except:
pass
def format_amount(self, x, is_diff=False, whitespaces=False, add_thousands_sep=True):
def format_amount(self, x, is_diff=False, whitespaces=False):
return format_satoshis(
x,
num_zeros=self.num_zeros,
@@ -667,7 +668,7 @@ class SimpleConfig(Logger):
is_diff=is_diff,
whitespaces=whitespaces,
precision=self.amt_precision_post_satoshi,
add_thousands_sep=add_thousands_sep,
add_thousands_sep=self.amt_add_thousands_sep,
)
def format_amount_and_units(self, amount):