mirror of
https://github.com/mempool/mempool.git
synced 2025-02-24 14:50:52 +01:00
Merge pull request #3110 from mempool/nymkappa/bugfix/missing-price-unconfirmed-tx
Fix 'NaN' price for unconfirmed transaction since we have no block timestamp
This commit is contained in:
commit
6e7ed29caa
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue