@@ -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