Handle token not having imageurl
This commit is contained in:
		
							
								
								
									
										4
									
								
								main.js
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								main.js
									
									
									
									
									
								
							| @@ -277,9 +277,11 @@ const checkStatusAndUpdateOBS = async () => { | ||||
|     if (response.data.pairs && response.data.pairs.length > 0) { | ||||
|       const pair = response.data.pairs[0]; | ||||
|  | ||||
|       const defaultImageUrl = "https://etc.worldhistory.org/wp-content/uploads/2014/12/IMG_3573-888x1024.jpg"; | ||||
|  | ||||
|       const tokenData = { | ||||
|         name: pair.baseToken.name, | ||||
|         imageUrl: pair.info.imageUrl, | ||||
|         imageUrl: pair.info && pair.info.imageUrl ? pair.info.imageUrl : defaultImageUrl, | ||||
|         symbol: pair.baseToken.symbol, | ||||
|         marketCap: pair.fdv, | ||||
|         price: pair.priceUsd, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user