Add missing sanity check when fetching single price datapoint
This commit is contained in:
		
							parent
							
								
									5977251a20
								
							
						
					
					
						commit
						ea2193a42d
					
				@ -160,7 +160,7 @@ class PricesRepository {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      // Compute fiat exchange rates
 | 
					      // Compute fiat exchange rates
 | 
				
			||||||
      let latestPrice = rates[0] as ApiPrice;
 | 
					      let latestPrice = rates[0] as ApiPrice;
 | 
				
			||||||
      if (latestPrice.USD === -1) {
 | 
					      if (!latestPrice || latestPrice.USD === -1) {
 | 
				
			||||||
        latestPrice = priceUpdater.getEmptyPricesObj();
 | 
					        latestPrice = priceUpdater.getEmptyPricesObj();
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user