Fix TX update logic in Transactions
This commit is contained in:
parent
1f97bb36f9
commit
69dde55a21
|
@ -37,14 +37,6 @@ class Transactions(object):
|
||||||
inside = data["data"]
|
inside = data["data"]
|
||||||
|
|
||||||
txid = inside["id"]
|
txid = inside["id"]
|
||||||
try:
|
|
||||||
txtype = inside["type"]
|
|
||||||
except KeyError:
|
|
||||||
self.log.error("Typeless event: {id}", id=txid)
|
|
||||||
return
|
|
||||||
if txtype == "card_payment":
|
|
||||||
self.log.info("Ignoring card payment: {id}", id=txid)
|
|
||||||
return
|
|
||||||
|
|
||||||
if "type" not in inside:
|
if "type" not in inside:
|
||||||
stored_trade = r.hgetall(f"tx.{txid}")
|
stored_trade = r.hgetall(f"tx.{txid}")
|
||||||
|
@ -75,6 +67,11 @@ class Transactions(object):
|
||||||
return
|
return
|
||||||
# If type not in inside and we haven't hit any more returns
|
# If type not in inside and we haven't hit any more returns
|
||||||
return
|
return
|
||||||
|
else:
|
||||||
|
txtype = inside["type"]
|
||||||
|
if txtype == "card_payment":
|
||||||
|
self.log.info("Ignoring card payment: {id}", id=txid)
|
||||||
|
return
|
||||||
|
|
||||||
state = inside["state"]
|
state = inside["state"]
|
||||||
if "reference" in inside:
|
if "reference" in inside:
|
||||||
|
|
Loading…
Reference in New Issue