Merge pull request #3077 from danuker/patch-1

Update commands: output str(Decimals), not floats
This commit is contained in:
ThomasV 2017-10-20 20:40:24 +02:00 committed by GitHub
commit 5d61fadd5b
1 changed files with 2 additions and 2 deletions

View File

@ -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')
@ -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
})