Create a function to get all valid bank details

master
Mark Veidemanis 3 years ago
parent 5ed07abc07
commit 4a0d8ed1ad
Signed by: m
GPG Key ID: 5ACFCEED46C0904F

@ -166,6 +166,19 @@ class Markets(util.Base):
if asset == filter_asset:
yield (asset, countrycode, currency, provider)
def get_valid_account_details(self):
currencies = self.sinks.currencies
account_info = self.sinks.account_info
all_currencies = self.get_all_currencies()
supported_currencies = [currency for currency in currencies if currency in all_currencies]
currency_account_info_map = {}
for currency in supported_currencies:
for bank, accounts in account_info.items():
for account in accounts:
if account["currency"] == currency:
currency_account_info_map[currency] = account["account_number"]
return (supported_currencies, currency_account_info_map)
def distribute_account_details(self, currencies=None, account_info=None):
"""
Distribute account details for ads.

Loading…
Cancel
Save