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
|
:param data: details of transaction
|
||||||
:type data: dict
|
:type data: dict
|
||||||
"""
|
"""
|
||||||
|
print(f"Raw transaction data: {data}")
|
||||||
ts = data["timestamp"]
|
ts = data["timestamp"]
|
||||||
txid = data["transaction_id"]
|
txid = data["transaction_id"]
|
||||||
if "amount" not in data:
|
if "amount" not in data:
|
||||||
|
@ -86,15 +87,17 @@ class Transactions(util.Base):
|
||||||
self.log.info(f"Ignoring transaction with negative/zero amount: {txid}")
|
self.log.info(f"Ignoring transaction with negative/zero amount: {txid}")
|
||||||
return
|
return
|
||||||
currency = data["currency"]
|
currency = data["currency"]
|
||||||
if "meta" in data:
|
|
||||||
|
if "reference" in data:
|
||||||
|
reference = data["reference"]
|
||||||
|
elif "meta" in data:
|
||||||
if "provider_reference" in data["meta"]:
|
if "provider_reference" in data["meta"]:
|
||||||
reference = data["meta"]["provider_reference"]
|
reference = data["meta"]["provider_reference"]
|
||||||
else:
|
else:
|
||||||
reference = "not_set"
|
reference = "not_set"
|
||||||
elif "reference" in data:
|
|
||||||
reference = data["reference"]
|
|
||||||
else:
|
else:
|
||||||
reference = "not_set"
|
reference = "not_set"
|
||||||
|
|
||||||
subclass = data["subclass"]
|
subclass = data["subclass"]
|
||||||
to_store = {
|
to_store = {
|
||||||
"trade_id": "",
|
"trade_id": "",
|
||||||
|
|
Loading…
Reference in New Issue