tMerge pull request #3077 from danuker/patch-1 - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 5d61fadd5b8460fa9abb1e53486da86c2f17304e DIR parent b2f029851ad2be4537b1c6594f984ddb6c91d61b HTML Author: ThomasV <thomasv@electrum.org> Date: Fri, 20 Oct 2017 20:40:24 +0200 Merge pull request #3077 from danuker/patch-1 Update commands: output str(Decimals), not floats Diffstat: M lib/commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- DIR diff --git a/lib/commands.py b/lib/commands.py t@@ -193,7 +193,7 @@ class Commands: l = copy.deepcopy(self.wallet.get_utxos(exclude_frozen=False)) for i in l: v = i["value"] - i["value"] = float(v)/COIN if v is not None else None + i["value"] = str(Decimal(v)/COIN) if v is not None else None return l @command('n') t@@ -486,7 +486,7 @@ class Commands: 'input_addresses': input_addresses, 'output_addresses': output_addresses, 'label': label, - 'value': float(value)/COIN if value is not None else None, + 'value': str(Decimal(value)/COIN) if value is not None else None, 'height': height, 'confirmations': conf })