Fix references and make releasing live
This commit is contained in:
parent
4a0d8ed1ad
commit
7effd60954
|
@ -84,7 +84,13 @@ class Transactions(util.Base):
|
||||||
return
|
return
|
||||||
currency = data["currency"]
|
currency = data["currency"]
|
||||||
description = data["description"]
|
description = data["description"]
|
||||||
|
if "meta" in data:
|
||||||
|
if "provider_reference" in data["meta"]:
|
||||||
reference = data["meta"]["provider_reference"]
|
reference = data["meta"]["provider_reference"]
|
||||||
|
else:
|
||||||
|
reference = "not_set"
|
||||||
|
else:
|
||||||
|
reference = "not_set"
|
||||||
|
|
||||||
to_store = {
|
to_store = {
|
||||||
"trade_id": "",
|
"trade_id": "",
|
||||||
|
@ -172,8 +178,7 @@ class Transactions(util.Base):
|
||||||
return
|
return
|
||||||
|
|
||||||
r.hmset(f"tx.{txid}", to_store)
|
r.hmset(f"tx.{txid}", to_store)
|
||||||
# self.release_funds(stored_trade["id"], stored_trade["reference"])
|
self.release_funds(stored_trade["id"], stored_trade["reference"])
|
||||||
print("WOULD RELEASE THE FUCKING MONEY")
|
|
||||||
self.ux.notify.notify_complete_trade(amount, currency)
|
self.ux.notify.notify_complete_trade(amount, currency)
|
||||||
|
|
||||||
def release_funds(self, trade_id, reference):
|
def release_funds(self, trade_id, reference):
|
||||||
|
|
Loading…
Reference in New Issue