forked from LBRYCommunity/lbry-sdk
use floats() instead of Decimal() when we need to serialized to JSON (while providing satoshis for accuracy)
This commit is contained in:
parent
7c39e55089
commit
67dc297c97
1 changed files with 1 additions and 2 deletions
|
@ -1,4 +1,3 @@
|
||||||
from decimal import Decimal
|
|
||||||
from typing import List, Dict, Type
|
from typing import List, Dict, Type
|
||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
|
|
||||||
|
@ -49,7 +48,7 @@ class WalletManager(object):
|
||||||
satoshis = yield account.get_balance(confirmations)
|
satoshis = yield account.get_balance(confirmations)
|
||||||
ledger_balances.append({
|
ledger_balances.append({
|
||||||
'account': account.name,
|
'account': account.name,
|
||||||
'coins': round(Decimal(satoshis) / COIN, 2),
|
'coins': round(satoshis/COIN, 2),
|
||||||
'satoshis': satoshis,
|
'satoshis': satoshis,
|
||||||
'is_default_account': i == 0 and j == 0
|
'is_default_account': i == 0 and j == 0
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue