Fix references not being pulled
This commit is contained in:
parent
74bcf4a5ab
commit
cd0a772e65
|
@ -75,6 +75,7 @@ class Transactions(util.Base):
|
|||
:param data: details of transaction
|
||||
:type data: dict
|
||||
"""
|
||||
print(f"Raw transaction data: {data}")
|
||||
ts = data["timestamp"]
|
||||
txid = data["transaction_id"]
|
||||
if "amount" not in data:
|
||||
|
@ -86,15 +87,17 @@ class Transactions(util.Base):
|
|||
self.log.info(f"Ignoring transaction with negative/zero amount: {txid}")
|
||||
return
|
||||
currency = data["currency"]
|
||||
if "meta" in data:
|
||||
|
||||
if "reference" in data:
|
||||
reference = data["reference"]
|
||||
elif "meta" in data:
|
||||
if "provider_reference" in data["meta"]:
|
||||
reference = data["meta"]["provider_reference"]
|
||||
else:
|
||||
reference = "not_set"
|
||||
elif "reference" in data:
|
||||
reference = data["reference"]
|
||||
else:
|
||||
reference = "not_set"
|
||||
|
||||
subclass = data["subclass"]
|
||||
to_store = {
|
||||
"trade_id": "",
|
||||
|
|
Loading…
Reference in New Issue