update involvedPairs calculation
This commit is contained in:
parent
76bc8cf800
commit
a8e15f81f0
1 changed files with 7 additions and 1 deletions
|
|
@ -250,8 +250,14 @@ class StatsController {
|
|||
{} as Record<number, number>,
|
||||
);
|
||||
|
||||
const daysInPeriod = Math.ceil(
|
||||
(to_timestamp_parsed - from_timestamp_parsed) / (24 * 60 * 60 * 1000),
|
||||
);
|
||||
|
||||
const requiredVolumePerDay = MIN_VOLUME_THRESHOLD / 30;
|
||||
|
||||
const involvedPairs = Object.keys(pairVolumes).filter(
|
||||
(pairId) => pairVolumes[Number(pairId)] > MIN_VOLUME_THRESHOLD,
|
||||
(pairId) => pairVolumes[Number(pairId)] >= requiredVolumePerDay * daysInPeriod,
|
||||
);
|
||||
|
||||
const entries = Object.entries(pairVolumes);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue