diff --git a/src/services/metrics/index.ts b/src/services/metrics/index.ts index aa086af5..64d46960 100644 --- a/src/services/metrics/index.ts +++ b/src/services/metrics/index.ts @@ -214,15 +214,12 @@ export default class Handler { } async GetAppMetrics(req: Types.AppsMetricsRequest, app: Application | null): Promise { - console.log("fetching app metrics") const totalFees = await this.storage.paymentStorage.GetTotalFeesPaidInApp(app) - console.log("fetching ops") const ops = await this.storage.paymentStorage.GetAppOperations(app, { from: req.from_unix, to: req.to_unix }) let totalReceived = 0 let totalSpent = 0 let unpaidInvoices = 0 let feesInRange = 0 - console.log("processing metrics") const operations: Types.UserOperation[] = [] ops.receivingInvoices.forEach(i => { if (i.paid_at_unix > 0) { diff --git a/src/services/storage/db/serializationHelpers.ts b/src/services/storage/db/serializationHelpers.ts index d64f7e40..eb27f678 100644 --- a/src/services/storage/db/serializationHelpers.ts +++ b/src/services/storage/db/serializationHelpers.ts @@ -32,7 +32,6 @@ export function deserializeFindOperator(serialized: SerializedFindOperator): Fin case 'ilike': return ILike(serialized.value); case 'between': - console.log("serializing between", serialized.value) return Between(serialized.value[0], serialized.value[1]); case 'in': return In(serialized.value); diff --git a/src/services/storage/db/storageProcessor.ts b/src/services/storage/db/storageProcessor.ts index e4f86f24..49ee54b1 100644 --- a/src/services/storage/db/storageProcessor.ts +++ b/src/services/storage/db/storageProcessor.ts @@ -449,16 +449,9 @@ class StorageProcessor { } private async handleFind(operation: FindOperation) { - if(operation.entity == 'BalanceEvent') { - //@ts-ignore - console.log(operation.q.where?.created_at._value) - } const res = await this.handleRead(operation.txId, eM => { return eM.getRepository(this.getEntity(operation.entity)).find(operation.q) }) - if(operation.entity == 'BalanceEvent') { - console.log(res) - } this.sendResponse({ success: true, type: 'find', diff --git a/src/services/storage/metricsStorage.ts b/src/services/storage/metricsStorage.ts index 9e40e706..2a93249f 100644 --- a/src/services/storage/metricsStorage.ts +++ b/src/services/storage/metricsStorage.ts @@ -82,10 +82,6 @@ export default class { async GetBalanceEvents({ from, to }: { from?: number, to?: number }, txId?: string) { const q = getTimeQuery({ from, to }) const chainBalanceEvents = await this.dbs.Find('BalanceEvent', q, txId) - //@ts-ignore - console.log(q.where?.created_at._value) - console.log("chainBalanceEvents") - console.log(chainBalanceEvents) return { chainBalanceEvents } } @@ -163,16 +159,12 @@ const getTimeQuery = ({ from, to }: { from?: number, to?: number }): FindManyOpt if (!!from && !!to) { const fromDate = new Date(from * 1000) const toDate = new Date(to * 1000) - console.log("from", fromDate) - console.log("to", toDate) return { where: { created_at: Between(fromDate, toDate) }, order: { created_at: 'ASC' } } } else if (!!from) { const fromDate = new Date(from * 1000) - console.log("from", fromDate) return { where: { created_at: MoreThanOrEqual(fromDate) }, order: { created_at: 'ASC' } } } else if (!!to) { const toDate = new Date(to * 1000) - console.log("to", toDate) return { where: { created_at: LessThanOrEqual(toDate) }, order: { created_at: 'ASC' } } } return {}