From 095d686422712b44c341d4473d1b138bfca93b36 Mon Sep 17 00:00:00 2001 From: Matthias Geihs Date: Mon, 16 Dec 2024 12:29:27 +0100 Subject: [PATCH] suppress dkls client logs --- src/mpcCoreKit.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mpcCoreKit.ts b/src/mpcCoreKit.ts index f60f888..b4c874f 100644 --- a/src/mpcCoreKit.ts +++ b/src/mpcCoreKit.ts @@ -790,6 +790,13 @@ export class Web3AuthMPCCoreKit implements ICoreKit, IMPCContext { this.wasmLib as DKLSWasmLib ); + // Suppress client logs if logging is disabled. + client.log = (msg: string) => { + if (!this.enableLogging) return; + // eslint-disable-next-line no-console + console.log(msg); + }; + const serverCoeffs: Record = {}; for (let i = 0; i < participatingServerDKGIndexes.length; i++) { const serverIndex = participatingServerDKGIndexes[i];