From a4ae7da7153b50096fcea937ded30f78e04a3436 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Tue, 25 Jan 2022 18:57:35 +0000 Subject: [PATCH] Nag on IRC if there's not enough in the XMR wallet to withdraw --- handler/agora.py | 3 ++- handler/commands.py | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/handler/agora.py b/handler/agora.py index 124d5cb..d5cac7f 100644 --- a/handler/agora.py +++ b/handler/agora.py @@ -654,6 +654,7 @@ class Agora(object): self.log.error( "Not enough funds to withdraw {profit}, as wallet only contains {wallet}", profit=profit_usd_in_xmr, wallet=wallet_xmr ) + self.irc.sendmsg(f"Not enough funds to withdraw {profit_usd_in_xmr}, as wallet only contains {wallet_xmr}") return if not profit_usd >= float(settings.Money.WithdrawLimit): @@ -677,4 +678,4 @@ class Agora(object): send_cast["address"] = settings.XMR.Wallet2 rtrn2 = self.agora.wallet_send_xmr(**send_cast) - return (rtrn1["success"], rtrn2["success"]) + self.irc.sendmsg(f"Withdrawal: {rtrn1['success']} | {rtrn2['success']}") diff --git a/handler/commands.py b/handler/commands.py index 2ccc27b..a2c8f60 100644 --- a/handler/commands.py +++ b/handler/commands.py @@ -407,5 +407,4 @@ class IRCCommands(object): @staticmethod def run(cmd, spl, length, authed, msg, agora, revolut, tx): - rtrn = agora.withdraw_funds() - msg(dumps(rtrn)) + agora.withdraw_funds()