Split GetBalance to a core RetrieveBalance and the user command

This commit is contained in:
moneromooo 2015-01-24 11:31:53 +00:00
parent 2cb01954d4
commit d5ab3b88f5
2 changed files with 11 additions and 5 deletions

View file

@ -212,6 +212,16 @@ def RetrieveTipbotBalance():
return
return balance, unlocked_balance
def RetrieveBalance(link):
try:
balance = redis_hget("balances",link.identity())
if balance == None:
balance = 0
return long(balance)
except Exception, e:
log_error('RetrieveBalance: exception: %s' % str(e))
raise
def IdentityFromString(link,s):
if s.find(':') == -1:
network = link.network.name