Skip to content

Commit 55db6ef

Browse files
committed
fix(tokens): handle null decimals value in tokens
1 parent 1ae5ace commit 55db6ef

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/api/tokens/manager.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,17 @@ async def ingest_coingecko_data(cls) -> None:
9898
if not chain:
9999
continue
100100

101+
decimals = raw_token_info.get("decimals")
102+
if not decimals:
103+
continue
104+
101105
token_info = TokenInfo(
102106
coin=chain.coin,
103107
chain_id=chain.chain_id,
104108
address=address,
105109
name=raw_token_info["name"],
106110
symbol=raw_token_info["symbol"],
107-
decimals=raw_token_info["decimals"],
111+
decimals=decimals,
108112
logo=raw_token_info["logo"],
109113
sources=[], # We'll add sources later
110114
)

0 commit comments

Comments
 (0)