From f58aac0a075e608d7744e538a7e644fb30d7a03c Mon Sep 17 00:00:00 2001 From: harisang Date: Thu, 19 Oct 2023 02:21:14 +0300 Subject: [PATCH] fix mypy error --- src/apis/coingeckoapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apis/coingeckoapi.py b/src/apis/coingeckoapi.py index 158620c..b3b50c3 100644 --- a/src/apis/coingeckoapi.py +++ b/src/apis/coingeckoapi.py @@ -36,7 +36,7 @@ def get_token_price_in_usd(self, address: str) -> Optional[float]: timeout=REQUEST_TIMEOUT, ) coingecko_rsp = coingecko_data.json() - coingecko_price_in_usd = coingecko_rsp[address]["usd"] + coingecko_price_in_usd = float(coingecko_rsp[address]["usd"]) except requests.RequestException as err: self.logger.warning( f"Connection error while fetching Coingecko price for token {address}, error: {err}"