Skip to content

Commit 095d686

Browse files
committed
suppress dkls client logs
1 parent ac353ad commit 095d686

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/mpcCoreKit.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,13 @@ export class Web3AuthMPCCoreKit implements ICoreKit, IMPCContext {
790790
this.wasmLib as DKLSWasmLib
791791
);
792792

793+
// Suppress client logs if logging is disabled.
794+
client.log = (msg: string) => {
795+
if (!this.enableLogging) return;
796+
// eslint-disable-next-line no-console
797+
console.log(msg);
798+
};
799+
793800
const serverCoeffs: Record<number, string> = {};
794801
for (let i = 0; i < participatingServerDKGIndexes.length; i++) {
795802
const serverIndex = participatingServerDKGIndexes[i];

0 commit comments

Comments
 (0)