File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,8 @@ export const coinrankEngine = async (
6262
6363 const reply = await response . json ( )
6464 const marketsPage = asCoingeckoMarkets ( reply )
65- markets = [ ...markets , ...marketsPage ]
65+ // Filter out assets without a rank (newly listed assets may lack rankings)
66+ markets = [ ...markets , ...marketsPage . filter ( m => m . rank != null ) ]
6667 page ++
6768 if ( page > NUM_PAGES ) break
6869 }
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ const asCoingeckoAsset = (raw: any) => {
3535 image : asString ,
3636 current_price : asOptional ( asNumber ) ,
3737 market_cap : asOptional ( asNumber ) ,
38- market_cap_rank : asNumber ,
38+ market_cap_rank : asOptional ( asNumber ) ,
3939
4040 high_24h : asOptional ( asNumber ) ,
4141 low_24h : asOptional ( asNumber ) ,
You can’t perform that action at this time.
0 commit comments