From 6760756d11095c333540630d6650c8573dcc4d96 Mon Sep 17 00:00:00 2001 From: moneromooo Date: Mon, 2 Feb 2015 17:48:37 +0000 Subject: [PATCH] payment: fix copy/paste error in moving to accounts --- tipbot/modules/payment.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tipbot/modules/payment.py b/tipbot/modules/payment.py index 98d9c77..2aa6672 100644 --- a/tipbot/modules/payment.py +++ b/tipbot/modules/payment.py @@ -112,7 +112,7 @@ def UpdateCoin(data): if not recipient: raise RuntimeError('Payment ID %s not found' % payment_id) account = redis_hget('accounts',recipient) - if accounts == None: + if account == None: raise RuntimeError('No account found for %s' % recipient) log_info('UpdateCoin: Found payment %s to %s for %s' % (tx_hash,recipient, AmountToString(amount))) cp.hincrby('confirming_payments',account,amount) @@ -138,7 +138,8 @@ def UpdateCoin(data): recipient = GetIdentityFromPaymentID(payment_id) if not recipient: raise RuntimeError('Payment ID %s not found' % payment_id) - if accounts == None: + account = redis_hget('accounts',recipient) + if account == None: raise RuntimeError('No account found for %s' % recipient) log_info('UpdateCoin: Found payment %s to %s for %s' % (tx_hash,recipient, AmountToString(amount))) pipe.hincrby("balances",account,amount)