File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -30,10 +30,14 @@ export const criticalResetAccount = async (coreKitInstance: Web3AuthMPCCoreKit):
3030 throw new Error ( "coreKitInstance is not set" ) ;
3131 }
3232
33- await coreKitInstance . tKey . storageLayer . setMetadata ( {
34- privKey : new BN ( coreKitInstance . state . postBoxKey ! , "hex" ) ,
35- input : { message : "KEY_NOT_FOUND" } ,
36- } ) ;
33+ if ( coreKitInstance . tKey . secp256k1Key ) {
34+ await coreKitInstance . tKey . CRITICAL_deleteTkey ( ) ;
35+ } else {
36+ await coreKitInstance . tKey . storageLayer . setMetadata ( {
37+ privKey : new BN ( coreKitInstance . state . postBoxKey ! , "hex" ) ,
38+ input : { message : "KEY_NOT_FOUND" } ,
39+ } ) ;
40+ }
3741} ;
3842
3943const privateKey = "MEECAQAwEwYHKoZIzj0CAQYIKoZIzj0DAQcEJzAlAgEBBCCD7oLrcKae+jVZPGx52Cb/lKhdKxpXjl9eGNa1MlY57A==" ;
You can’t perform that action at this time.
0 commit comments