From 117983a2668ec0a819b7ba6510f219fe9b6287ef Mon Sep 17 00:00:00 2001 From: lalanza808 Date: Mon, 13 Jan 2020 14:12:55 -0800 Subject: [PATCH] add balances to show_transactions mgmt command --- core/management/commands/show_transactions.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/management/commands/show_transactions.py b/core/management/commands/show_transactions.py index bed495c..20eccb6 100644 --- a/core/management/commands/show_transactions.py +++ b/core/management/commands/show_transactions.py @@ -22,6 +22,8 @@ class Command(BaseCommand): msg['balances'].append({ "index": index, "address": str(account.address()), + "locked_balance": float(account.balances()[0]), + "unlocked_balance": float(account.balances()[1]), "outgoing": [str(i) for i in account.outgoing()], "incoming": [str(i) for i in account.incoming()], }) @@ -32,6 +34,8 @@ class Command(BaseCommand): msg['balances'].append({ "sale_id": sale.id, "address": str(w.address()), + "locked_balance": float(w.balances()[0]), + "unlocked_balance": float(w.balances()[1]), "outgoing": [str(i) for i in w.outgoing()], "incoming": [str(i) for i in w.incoming()], })