fix total stats volume filter
This commit is contained in:
parent
f46d21d831
commit
33c7f389cb
1 changed files with 3 additions and 1 deletions
|
|
@ -139,7 +139,7 @@ class StatsController {
|
|||
|
||||
const allRates = (
|
||||
(await Pair.findAll({
|
||||
attributes: ['id', 'rate'],
|
||||
attributes: ['id', 'rate', 'volume'],
|
||||
include: [
|
||||
{
|
||||
model: Currency,
|
||||
|
|
@ -174,6 +174,8 @@ class StatsController {
|
|||
.filter((pair) => pair.volume > MIN_VOLUME_THRESHOLD)
|
||||
.sort((a, b) => new Decimal(b.tvl).minus(new Decimal(a.tvl)).toNumber());
|
||||
|
||||
console.log('allTvls', allTvls);
|
||||
|
||||
const totalTVL = allTvls.reduce(
|
||||
(acc, pair) => acc.add(new Decimal(pair.tvl)),
|
||||
new Decimal(0),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue