Format the output from releasing funds nicer

This commit is contained in:
Mark Veidemanis 2022-01-20 14:48:14 +00:00
parent 5c7225b393
commit ad04c1ac3f
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
2 changed files with 6 additions and 2 deletions

View File

@ -298,7 +298,9 @@ class IRCCommands(object):
msg(f"No such reference: {spl[1]}") msg(f"No such reference: {spl[1]}")
return return
rtrn = agora.release_funds(tx) 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): class nuke(object):
name = "nuke" name = "nuke"

View File

@ -179,7 +179,9 @@ class Transactions(object):
self.irc.sendmsg(f"All checks passed, releasing funds for {stored_trade['id']} / {reference}") self.irc.sendmsg(f"All checks passed, releasing funds for {stored_trade['id']} / {reference}")
rtrn = self.agora.release_funds(stored_trade["id"]) rtrn = self.agora.release_funds(stored_trade["id"])
self.agora.agora.contact_message_post(stored_trade["id"], "Thanks! Releasing now :)") 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): def new_trade(self, trade_id, buyer, currency, amount, amount_xmr):
""" """