From 6ecfc94ff1e16b309aea191f8c744a2b29254d3e Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Wed, 7 Nov 2018 10:39:13 -0300 Subject: [PATCH] add balance to startup report --- lbrynet/extras/wallet/ledger.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lbrynet/extras/wallet/ledger.py b/lbrynet/extras/wallet/ledger.py index 4e087fafb..dcddad4f7 100644 --- a/lbrynet/extras/wallet/ledger.py +++ b/lbrynet/extras/wallet/ledger.py @@ -2,6 +2,7 @@ import asyncio import logging from binascii import unhexlify +from lbrynet.extras.wallet.dewies import dewies_to_lbc from lbrynet.schema.error import URIParseError from lbrynet.schema.uri import parse_lbry_uri from torba.client.baseledger import BaseLedger @@ -85,9 +86,10 @@ class MainNetLedger(BaseLedger): total_change = len((await account.change.get_addresses())) channel_count = await account.get_channel_count() claim_count = await account.get_claim_count() - log.info("Loaded account %s with %d receiving addresses (gap: %d), " - "%d change addresses (gap: %d), %d channels, %d certificates and %d claims.", - account.id, total_receiving, account.receiving.gap, total_change, account.change.gap, + balance = dewies_to_lbc(await account.get_balance()) + log.info("Loaded account %s with %s LBC, %d receiving addresses (gap: %d), " + "%d change addresses (gap: %d), %d channels, %d certificates and %d claims. ", + account.id, balance, total_receiving, account.receiving.gap, total_change, account.change.gap, channel_count, len(account.certificates), claim_count)