recent prices should also filter for zeros

This commit is contained in:
Maximilian Schneider 2021-08-27 02:04:50 +02:00
parent 79a2577440
commit 43dd492b3c
1 changed files with 2 additions and 1 deletions

View File

@ -425,7 +425,8 @@ export class AggregatedFeed {
recentPrices() : IPrice[] { recentPrices() : IPrice[] {
return this.prices.filter((p) => p && return this.prices.filter((p) => p &&
p.timestamp && p.timestamp &&
(p.timestamp - Date.now()) < 10*SECONDS) (p.timestamp - Date.now()) < 10*SECONDS &&
p.value > 0)
} }
get median(): IPrice | undefined { get median(): IPrice | undefined {