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