Nag on IRC if there's not enough in the XMR wallet to withdraw

This commit is contained in:
Mark Veidemanis 2022-01-25 18:57:35 +00:00
parent 7b5290a1e0
commit a4ae7da715
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
2 changed files with 3 additions and 3 deletions

View File

@ -654,6 +654,7 @@ class Agora(object):
self.log.error( self.log.error(
"Not enough funds to withdraw {profit}, as wallet only contains {wallet}", profit=profit_usd_in_xmr, wallet=wallet_xmr "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 return
if not profit_usd >= float(settings.Money.WithdrawLimit): if not profit_usd >= float(settings.Money.WithdrawLimit):
@ -677,4 +678,4 @@ class Agora(object):
send_cast["address"] = settings.XMR.Wallet2 send_cast["address"] = settings.XMR.Wallet2
rtrn2 = self.agora.wallet_send_xmr(**send_cast) rtrn2 = self.agora.wallet_send_xmr(**send_cast)
return (rtrn1["success"], rtrn2["success"]) self.irc.sendmsg(f"Withdrawal: {rtrn1['success']} | {rtrn2['success']}")

View File

@ -407,5 +407,4 @@ class IRCCommands(object):
@staticmethod @staticmethod
def run(cmd, spl, length, authed, msg, agora, revolut, tx): def run(cmd, spl, length, authed, msg, agora, revolut, tx):
rtrn = agora.withdraw_funds() agora.withdraw_funds()
msg(dumps(rtrn))