mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
Add the tipbot's personal balance when querying house balance
It's not part of the "spendable" house balance, so must be accounted for separately.
This commit is contained in:
parent
1726d85d5c
commit
69d0f89549
1 changed files with 5 additions and 1 deletions
|
@ -244,11 +244,15 @@ def RetrieveHouseBalance():
|
||||||
def GetHouseBalance(link,cmd):
|
def GetHouseBalance(link,cmd):
|
||||||
try:
|
try:
|
||||||
balance = RetrieveHouseBalance()
|
balance = RetrieveHouseBalance()
|
||||||
|
personal_balance=0
|
||||||
|
for network in networks:
|
||||||
|
identity=network.name+':'+config.tipbot_name
|
||||||
|
personal_balance += long(redis_hget('balances',identity) or 0)
|
||||||
except Exception,e:
|
except Exception,e:
|
||||||
log_error('Failed to retrieve house balance: %s' % str(e))
|
log_error('Failed to retrieve house balance: %s' % str(e))
|
||||||
link.send('An error occured')
|
link.send('An error occured')
|
||||||
return
|
return
|
||||||
link.send('House balance: %s' % AmountToString(balance))
|
link.send('House balance: %s, %s personal balance: %s' % (AmountToString(balance), config.tipbot_name, AmountToString(personal_balance)))
|
||||||
|
|
||||||
def ReserveBalance(link,cmd):
|
def ReserveBalance(link,cmd):
|
||||||
rbal=GetParam(cmd,1)
|
rbal=GetParam(cmd,1)
|
||||||
|
|
Loading…
Reference in a new issue