Skip to content

Commit

Permalink
add kleros list filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
harisang committed Oct 18, 2023
1 parent 2b615dd commit fee7aca
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/monitoring_tests/buffers_monitoring_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,20 @@ def compute_buffers_value(self) -> bool:
)
rsp = resp.json()

kleros_resp = requests.get(
"http://t2crtokens.eth.link",
headers=header,
timeout=REQUEST_TIMEOUT,
)
kleros_rsp = kleros_resp.json()
kleros_list = []
for t in kleros_rsp["tokens"]:
kleros_list.append(t["address"])

value_in_usd = 0.0
for token in rsp["tokens"]:
if token["tokenInfo"]["address"] not in kleros_list:
continue
balance = token["balance"]
decimals = int(token["tokenInfo"]["decimals"])
if token["tokenInfo"]["price"] is not False:
Expand Down

0 comments on commit fee7aca

Please sign in to comment.