Fix 'NaN' price for unconfirmed transaction since we have no block timestamp
This commit is contained in:
		
							parent
							
								
									00cbb5d0d8
								
							
						
					
					
						commit
						2246a6f3ce
					
				| @ -93,6 +93,10 @@ export class PriceService { | ||||
|    * @param blockTimestamp  | ||||
|    */ | ||||
|   getPriceForTimestamp(blockTimestamp: number): Price | null { | ||||
|     if (!blockTimestamp) { | ||||
|       return undefined; | ||||
|     } | ||||
| 
 | ||||
|     const priceTimestamps = Object.keys(this.historicalPrice.prices); | ||||
|     priceTimestamps.push(Number.MAX_SAFE_INTEGER.toString()); | ||||
|     priceTimestamps.sort().reverse(); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user