Create a function to get all valid bank details
This commit is contained in:
parent
5ed07abc07
commit
4a0d8ed1ad
|
@ -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…
Reference in New Issue