use floats() instead of Decimal() when we need to serialized to JSON (while providing satoshis for accuracy)

This commit is contained in:
Lex Berezhny 2018-07-21 14:39:53 -04:00
parent 7c39e55089
commit 67dc297c97

View file

@ -1,4 +1,3 @@
from decimal import Decimal
from typing import List, Dict, Type
from twisted.internet import defer
@ -49,7 +48,7 @@ class WalletManager(object):
satoshis = yield account.get_balance(confirmations)
ledger_balances.append({
'account': account.name,
'coins': round(Decimal(satoshis) / COIN, 2),
'coins': round(satoshis/COIN, 2),
'satoshis': satoshis,
'is_default_account': i == 0 and j == 0
})