Example #1
0
def my_balance(args, address='default'):
    if address == 'default':
        address = tools.db_get('address')
    try:
        return tools.db_get(address)['amount'] - tools.cost_0(tools.db_get('txs'), address)
    except:
        return 0
Example #2
0
def my_balance(DB, args, address='default'): 
    if address=='default':
        address=tools.db_get('address')
    return(tools.db_get(address, DB)['amount']-tools.cost_0(tools.db_get('txs'), address))
Example #3
0
def my_balance(DB, args, address='default'):
    if address == 'default':
        address = tools.local_get('address')
    return (tools.db_get(address, DB)['amount'] -
            tools.cost_0(tools.local_get('txs'), address))
Example #4
0
def my_balance(DB, args, address="default"):
    if address == "default":
        address = tools.local_get("address")
    return tools.db_get(address, DB)["amount"] - tools.cost_0(tools.local_get("txs"), address)