From 1ee39989af4d36a6705137811a6510648fa58f76 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Thu, 30 Dec 2021 22:41:03 +0000 Subject: [PATCH] Post a nice message when releasing funds --- handler/transactions.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/handler/transactions.py b/handler/transactions.py index ccdac5b..ff92462 100644 --- a/handler/transactions.py +++ b/handler/transactions.py @@ -79,11 +79,8 @@ class Transactions(object): self.irc.client.channel, f"AUTO Incoming transaction: {amount}{currency} ({reference}) - {state} - {description}" ) # Try getting the trade by the reference ID given - print("REFERENCE", reference) stored_trade = self.get_ref(reference) - print(f"STORED_TRADE {stored_trade}") if not stored_trade: - print(f"NOT STORED TRADE {reference}") self.log.info(f"No reference in DB for {reference}", reference=reference) self.irc.client.msg(self.irc.client.channel, f"No reference in DB for {reference}") return @@ -114,7 +111,8 @@ class Transactions(object): self.irc.client.msg(self.irc.client.channel, f"Account type is not Revolut: {account_type}") return self.irc.client.msg(self.irc.client.channel, f"All checks passed, releasing funds for {stored_trade['id']} / {reference}") - rtrn = self.agora.release_funds(txid) + rtrn = self.agora.release_funds(stored_trade["id"]) + self.agora.agora.contact_message_post(stored_trade["id"], "Thanks! Releasing now :)") self.irc.client.msg(self.irc.client.channel, dumps(rtrn)) def new_trade(self, trade_id, buyer, currency, amount, amount_xmr): @@ -199,9 +197,7 @@ class Transactions(object): :rtype: string """ ref_data = r.hgetall(f"trade.{reference}") - print(f"RETURN FROM GET_REF() {ref_data}") ref_data = convert(ref_data) - print(f"CONVERTED IN GET_REF() {ref_data}") if not ref_data: return False return ref_data