Fix references and make releasing live

This commit is contained in:
Mark Veidemanis 2022-03-09 07:10:25 +00:00
parent 4a0d8ed1ad
commit 7effd60954
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 8 additions and 3 deletions

View File

@ -84,7 +84,13 @@ class Transactions(util.Base):
return return
currency = data["currency"] currency = data["currency"]
description = data["description"] 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 = { 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):