Add error handling to getting bank details

This commit is contained in:
Mark Veidemanis 2022-04-21 20:49:14 +01:00
parent 7d9679f2d5
commit 6e20d8c693
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
2 changed files with 5 additions and 0 deletions

View File

@ -296,6 +296,8 @@ class Markets(util.Base):
"""
Format the payment details.
"""
if not payment_details:
return False
if real:
payment = settings.Platform.PaymentDetailsReal
else:

View File

@ -952,4 +952,7 @@ class IRCCommands(object):
currency = spl[2]
account_info = tx.markets.get_matching_account_details(platform, currency)
bank_details = tx.markets.format_payment_details(currency, account_info, real=True)
if not bank_details:
msg("Could not get bank details.")
return
msg(bank_details)