From 6dae0334b65fa3ddeba381a69347523f4734a260 Mon Sep 17 00:00:00 2001 From: Oleg Kalenik Date: Wed, 19 Jan 2022 18:38:18 +0200 Subject: [PATCH] *fixed total in/out metric calculation --- libs/receipt/src/receipt-action.service.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libs/receipt/src/receipt-action.service.ts b/libs/receipt/src/receipt-action.service.ts index c5a7eee..da0fbdb 100644 --- a/libs/receipt/src/receipt-action.service.ts +++ b/libs/receipt/src/receipt-action.service.ts @@ -107,6 +107,12 @@ export class ReceiptActionService { transferType === TransferType.Incoming ? 'receiver' : 'predecessor' }_account_id ${dao ? `= '${dao}'` : `like '%.${contractName}'`}`, ); + + qb.andWhere( + `receipt_${ + transferType === TransferType.Incoming ? 'predecessor' : 'receiver' + }_account_id ${dao ? `!= '${dao}'` : `not like '%.${contractName}'`}`, + ); } if (from) {