Exemple #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
Exemple #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))
Exemple #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))
Exemple #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)