Skip to content

Commit

Permalink
Fix symbol filter
Browse files Browse the repository at this point in the history
  • Loading branch information
ZIMkaRU committed Sep 14, 2022
1 parent b122c12 commit ff599b1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions workers/loc.api/sync/total.fees.report/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use strict'

const { merge } = require('lodash')

const {
TotalFeesParamsFlagError
} = require('../../errors')
Expand Down Expand Up @@ -112,16 +114,16 @@ class TotalFeesReport {
const filterToSkipNotRecalcedBalance = user.isSubAccount
? { _isBalanceRecalced: 1 }
: {}
const _filter = merge(filter, symbFilter)

return this.dao.getElemsInCollBy(
this.ALLOWED_COLLS.LEDGERS,
{
filter: {
...filter,
..._filter,
user_id: user._id,
$lte: { mts: end },
$gte: { mts: start },
...symbFilter,
...filterToSkipNotRecalcedBalance
},
sort: [['mts', -1]],
Expand Down

0 comments on commit ff599b1

Please sign in to comment.