From 6aec0c1078780aa80c199cd98356cbf0a2ec65c6 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Wed, 1 Jun 2022 09:08:39 +0100 Subject: [PATCH] Don't send invalid payment information to customer --- handler/lib/markets.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/handler/lib/markets.py b/handler/lib/markets.py index 91c80b9..dfc211e 100644 --- a/handler/lib/markets.py +++ b/handler/lib/markets.py @@ -61,6 +61,9 @@ class Markets(util.Base): if send_setting == "1": account_info = self.get_matching_account_details(platform, currency) formatted_account_info = self.format_payment_details(currency, account_info, real=True) + if not formatted_account_info: + self.log.error(f"Payment info invalid: {formatted_account_info}") + return post_message( trade_id, f"Payment details: \n{formatted_account_info}",