Skip to content

Commit b71a5d4

Browse files
committed
feat: remove remote copy and refresh functionality
1 parent 2f631b9 commit b71a5d4

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

src/mpcCoreKit.ts

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -700,15 +700,7 @@ export class Web3AuthMPCCoreKit implements ICoreKit, IMPCContext {
700700
}
701701

702702
return this.atomicSync(async () => {
703-
if (this.state.remoteClient) {
704-
if (shareType === this.state.tssShareIndex) {
705-
await this.tkey.remoteCopyFactorPub({ newFactorPub: factorPub, tssIndex: shareType, remoteClient: this.state.remoteClient });
706-
} else {
707-
await this.tkey.remoteAddFactorPub({ newFactorPub: factorPub, newFactorTSSIndex: shareType, remoteClient: this.state.remoteClient });
708-
}
709-
} else {
710-
await this.copyOrCreateShare(shareType, factorPub);
711-
}
703+
await this.copyOrCreateShare(shareType, factorPub);
712704
await this.backupMetadataShare(factorKey);
713705
await this.addFactorDescription({ factorKey, shareDescription, additionalMetadata, updateMetadata: false });
714706

@@ -914,12 +906,8 @@ export class Web3AuthMPCCoreKit implements ICoreKit, IMPCContext {
914906
throw CoreKitError.factorInUseCannotBeDeleted("Cannot delete current active factor");
915907
}
916908

917-
if (this.state.remoteClient) {
918-
await this.tkey.remoteDeleteFactorPub({ factorPubToDelete: factorPub, remoteClient: this.state.remoteClient });
919-
} else {
920-
const authSignatures = await this.getSessionSignatures();
921-
await this.tKey.deleteFactorPub({ factorKey: this.state.factorKey, deleteFactorPub: factorPub, authSignatures });
922-
}
909+
const authSignatures = await this.getSessionSignatures();
910+
await this.tKey.deleteFactorPub({ factorKey: this.state.factorKey, deleteFactorPub: factorPub, authSignatures });
923911
const factorPubHex = fpp.toSEC1(factorKeyCurve, true).toString("hex");
924912
const allDesc = this.tKey.metadata.getShareDescription();
925913
const keyDesc = allDesc[factorPubHex];

0 commit comments

Comments
 (0)