From 74bcf4a5ab3f661fba79a6f290ab2fe3200a2509 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Wed, 6 Apr 2022 12:21:28 +0100 Subject: [PATCH] Notify on unsuccessful release --- handler/transactions.py | 1 + handler/ux/notify.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/handler/transactions.py b/handler/transactions.py index f1b9d12..390a08e 100644 --- a/handler/transactions.py +++ b/handler/transactions.py @@ -204,6 +204,7 @@ class Transactions(util.Base): logmessage = f"Release funds unsuccessful: {rtrn['message']}" self.log.error(logmessage) self.irc.sendmsg(logmessage) + self.ux.notify.notify_release_unsuccessful(trade_id) return # Parse the escrow release response diff --git a/handler/ux/notify.py b/handler/ux/notify.py index 0bbdde7..4ed9f0b 100644 --- a/handler/ux/notify.py +++ b/handler/ux/notify.py @@ -41,3 +41,6 @@ class Notify(util.Base): def notify_tx_lookup_failed(self, currency, amount, reference, code, trade_id=None): self.sendmsg(f"Unknown TX [{code}]: {amount}{currency} ({reference}) for {trade_id}", title=code, tags="tx", priority="5") + + def notify_release_unsuccessful(self, trade_id): + self.sendmsg(f"Release unsuccessful for {trade_id}", title="Unsuccessful release", tags="tx", priority="5")