Skip to content

Commit d28e51c

Browse files
committed
fix: add new user indication
1 parent 8bf067d commit d28e51c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/mpcCoreKit.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ export class Web3AuthMPCCoreKit implements ICoreKit {
8686

8787
public torusSp: TSSTorusServiceProvider | null = null;
8888

89+
// new user indication
90+
// only true during new user sign up, after reinit or rehydration, the flag will be always false
91+
public newUser: boolean = false;
92+
8993
private options: Web3AuthOptionsWithDefaults;
9094

9195
private storageLayer: TorusStorageLayer | null = null;
@@ -1088,6 +1092,7 @@ export class Web3AuthMPCCoreKit implements ICoreKit {
10881092

10891093
// mutation function
10901094
private async handleNewUser(importTssKey?: string, isSfaKey?: boolean) {
1095+
this.newUser = true;
10911096
await this.atomicSync(async () => {
10921097
// Generate or use hash factor and initialize tkey with it.
10931098
let factorKey: BN;

0 commit comments

Comments
 (0)