Skip to content

Commit

Permalink
pre signing check fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshuchawla009 committed Feb 4, 2025
1 parent 0675fc1 commit b27bd19
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/mpcCoreKit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import {
EnableMFAParams,
ICoreKit,
IFactorKey,
IFactorManagerContext,
IMPCContext,
InitParams,
ISignerContext,
Expand Down Expand Up @@ -77,7 +78,7 @@ import {
scalarBNToBufferSEC1,
} from "./utils";

export class Web3AuthMPCCoreKit implements ICoreKit, IMPCContext, ISignerContext {
export class Web3AuthMPCCoreKit implements ICoreKit, IMPCContext, ISignerContext, IFactorManagerContext {
public state: Web3AuthState = { accountIndex: 0 };

public torusSp: TSSTorusServiceProvider | null = null;
Expand Down Expand Up @@ -1132,7 +1133,7 @@ export class Web3AuthMPCCoreKit implements ICoreKit, IMPCContext, ISignerContext
}

public async preSetupDKLSSigningConfig(): Promise<IDklsSignConfig> {
if (!this.hasRemoteFactorInitialized || !this.state.factorKey) {
if (!this.hasRemoteFactorInitialized && !this.state.factorKey) {
throw CoreKitError.factorKeyNotPresent("Factor key or remote factor not present in state when pre-setting up DKLSSigning.");
}
const { torusNodeTSSEndpoints } = fetchLocalConfig(this.options.web3AuthNetwork, this.keyType);
Expand Down

0 comments on commit b27bd19

Please sign in to comment.