From 4e88bd65b09de86f05b517580edfa82c78d9d868 Mon Sep 17 00:00:00 2001 From: ieow Date: Tue, 29 Oct 2024 17:10:00 +0800 Subject: [PATCH] fix: avoid update metadata during atomic sync in progress --- src/mpcCoreKit.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mpcCoreKit.ts b/src/mpcCoreKit.ts index cf372cd..2116318 100644 --- a/src/mpcCoreKit.ts +++ b/src/mpcCoreKit.ts @@ -619,7 +619,7 @@ export class Web3AuthMPCCoreKit implements ICoreKit { return this.atomicSync(async () => { await this.copyOrCreateShare(shareType, factorPub); await this.backupMetadataShare(factorKey); - await this.addFactorDescription(factorKey, shareDescription, additionalMetadata); + await this.addFactorDescription(factorKey, shareDescription, additionalMetadata, false); return scalarBNToBufferSEC1(factorKey).toString("hex"); }).catch((reason: Error) => { @@ -951,9 +951,9 @@ export class Web3AuthMPCCoreKit implements ICoreKit { // Store factor description. await this.backupMetadataShare(factorKey); if (this.options.disableHashedFactorKey) { - await this.addFactorDescription(factorKey, FactorKeyTypeShareDescription.Other); + await this.addFactorDescription(factorKey, FactorKeyTypeShareDescription.Other, undefined, false); } else { - await this.addFactorDescription(factorKey, FactorKeyTypeShareDescription.HashedShare); + await this.addFactorDescription(factorKey, FactorKeyTypeShareDescription.HashedShare, undefined, false); } }); }