Skip to content

Commit

Permalink
Merge pull request #187 from Web3Auth/chore/update-state-public
Browse files Browse the repository at this point in the history
make update state function public
  • Loading branch information
himanshuchawla009 authored Nov 4, 2024
2 parents 0dfbf03 + a6cd939 commit 840c2de
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/mpcCoreKit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,10 @@ export class Web3AuthMPCCoreKit implements ICoreKit {
}
}

public updateState(newState: Partial<Web3AuthState>): void {
this.state = { ...this.state, ...newState };
}

protected async atomicSync<T>(f: () => Promise<T>): Promise<T> {
this.atomicCallStackCounter += 1;

Expand Down Expand Up @@ -1199,10 +1203,6 @@ export class Web3AuthMPCCoreKit implements ICoreKit {
await this.tKey?.addShareDescription(factorPub, JSON.stringify(params), updateMetadata);
}

private updateState(newState: Partial<Web3AuthState>): void {
this.state = { ...this.state, ...newState };
}

private resetState(): void {
this.ready = false;
this.tkey = null;
Expand Down

0 comments on commit 840c2de

Please sign in to comment.