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