Naveen Kumar Vadlamudi
06/26/2023, 7:15 PMdef check_connection(self, logger, config) -> Tuple[bool, any]:
accepted_currencies = {"USD", "JPY", "BGN", "CZK", "DKK"} # assume these are the only allowed currencies
input_currency = config['base']
if input_currency not in accepted_currencies:
return False, f"Input currency {input_currency} is invalid. Please input one of the following currencies: {accepted_currencies}"
else:
return True, None