mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
Balances now belong to accounts, and identities map to an account
This commit is contained in:
parent
333c90d46a
commit
b07bb7ba6b
8 changed files with 107 additions and 50 deletions
|
@ -77,8 +77,9 @@ def Withdraw(link,cmd):
|
|||
link.send("Sorry, withdrawal is disabled due to a wallet error which requires admin assistance")
|
||||
return
|
||||
|
||||
account = GetAccount(identity)
|
||||
try:
|
||||
balance = redis_hget("balances",identity)
|
||||
balance = redis_hget('accounts',account)
|
||||
if balance == None:
|
||||
balance = 0
|
||||
balance=long(balance)
|
||||
|
@ -133,7 +134,7 @@ def Withdraw(link,cmd):
|
|||
link.send( "Tx sent: %s" % tx_hash)
|
||||
|
||||
try:
|
||||
redis_hincrby("balances",identity,-amount)
|
||||
redis_hincrby("balances",account,-amount)
|
||||
except Exception, e:
|
||||
log_error('Withdraw: FAILED TO SUBTRACT BALANCE: exception: %s' % str(e))
|
||||
CheckDisableWithdraw()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue