From 67dc297c9747fc3ab906f900140254b596d20c25 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Sat, 21 Jul 2018 14:39:53 -0400 Subject: [PATCH] use floats() instead of Decimal() when we need to serialized to JSON (while providing satoshis for accuracy) --- torba/manager.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/torba/manager.py b/torba/manager.py index 2cb998758..7a674afb9 100644 --- a/torba/manager.py +++ b/torba/manager.py @@ -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 })