From ad04c1ac3fd3f010cbad1de9e1d90acb0994c13d Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Thu, 20 Jan 2022 14:48:14 +0000 Subject: [PATCH] Format the output from releasing funds nicer --- handler/commands.py | 4 +++- handler/transactions.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/handler/commands.py b/handler/commands.py index cf09d83..02329de 100644 --- a/handler/commands.py +++ b/handler/commands.py @@ -298,7 +298,9 @@ class IRCCommands(object): msg(f"No such reference: {spl[1]}") return rtrn = agora.release_funds(tx) - msg(dumps(rtrn)) + message = rtrn["message"] + message_long = rtrn["response"]["data"]["message"] + msg(f"{message} - {message_long}") class nuke(object): name = "nuke" diff --git a/handler/transactions.py b/handler/transactions.py index 392d702..902aa68 100644 --- a/handler/transactions.py +++ b/handler/transactions.py @@ -179,7 +179,9 @@ class Transactions(object): self.irc.sendmsg(f"All checks passed, releasing funds for {stored_trade['id']} / {reference}") rtrn = self.agora.release_funds(stored_trade["id"]) self.agora.agora.contact_message_post(stored_trade["id"], "Thanks! Releasing now :)") - self.irc.sendmsg(dumps(rtrn)) + message = rtrn["message"] + message_long = rtrn["response"]["data"]["message"] + self.irc.sendmsg(f"{message} - {message_long}") def new_trade(self, trade_id, buyer, currency, amount, amount_xmr): """