From 70c739c744a8fa956bd607bbef740b465633f3e8 Mon Sep 17 00:00:00 2001 From: Anxo Rodriguez Date: Tue, 3 Dec 2024 11:52:56 +0000 Subject: [PATCH] fix: fix crash with error in log --- src/types/model.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/types/model.ts b/src/types/model.ts index f417d2c..f326399 100644 --- a/src/types/model.ts +++ b/src/types/model.ts @@ -288,8 +288,6 @@ function replacer(_key: any, value: any) { } } -const loadOwnerOrdersLogger = getLogger("loadOwnerOrders"); - async function loadOwnerOrders( storage: DBService, network: string @@ -313,7 +311,8 @@ async function loadOwnerOrders( version ); - loadOwnerOrdersLogger.info( + const log = getLogger("loadOwnerOrders"); + log.info( `Data size: ${str?.length}`, `Owners: ${ordersPerOwner.size}`, `Total orders: ${getOrdersCountFromOrdersPerOwner(ordersPerOwner)}`,