Skip to content

Commit

Permalink
Update src/apis/tokenlistapi.py
Browse files Browse the repository at this point in the history
Co-authored-by: Felix Henneke <felix.henneke@protonmail.com>
  • Loading branch information
harisang and fhenneke authored Nov 9, 2023
1 parent 22e3adf commit 30043a5
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/apis/tokenlistapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,18 @@ class TokenListAPI:

def __init__(self) -> None:
self.logger = get_logger()
self.token_lists = [
"http://t2crtokens.eth.link",
"https://tokens.1inch.eth.link",
"https://tokenlist.aave.eth.link",
]

def get_token_list(self) -> Optional[list[str]]:
"""
Returns a token list.
"""
kleros_url = "http://t2crtokens.eth.link"
one_inch_url = "https://tokens.1inch.eth.link"
aave_url = "https://tokenlist.aave.eth.link"

url_list = [kleros_url, one_inch_url, aave_url]

token_list: list[str] = []
for url in url_list:
for url in self.token_lists:
try:
data = requests.get(
url,
Expand Down

0 comments on commit 30043a5

Please sign in to comment.