diff --git a/Mce/abe.py b/Mce/abe.py index af73701..691806f 100755 --- a/Mce/abe.py +++ b/Mce/abe.py @@ -1719,6 +1719,28 @@ def handle_address(abe, page): body += [''] return + # Display native currency if the blockchain has one + if abe.get_blockchainparams(chain).get('initial-block-reward', 0) > 0: + body += ['

Native Balance

'] + try: + resp = util.jsonrpc(multichain_name, url, "getaddressbalances", address) + if len(resp) is 0: + body += ['None'] + else: + body += [''] + except util.JsonrpcException as e: + msg= "Failed to get balance for address: JSON-RPC error({0}): {1}".format(e.code, e.message) + body += ['
', msg, '
'] + return + except IOError as e: + msg= "Failed to get balance for address: I/O error({0}): {1}".format(e.errno, e.strerror) + body += [''] + return + body += ['

Asset Balances

'] try: row = abe.store.selectrow("""select pubkey_id from pubkey where pubkey_hash = ?""",