@b3dotfun/sdk 0.0.34 → 0.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/cjs/global-account/react/components/B3DynamicModal.js +1 -1
  2. package/dist/cjs/global-account/react/components/ManageAccount/ManageAccount.js +6 -3
  3. package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3.js +3 -3
  4. package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +13 -1
  5. package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +3 -1
  6. package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStep.js +4 -1
  7. package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +3 -0
  8. package/dist/cjs/global-account/react/hooks/useAuthentication.d.ts +1 -0
  9. package/dist/cjs/global-account/react/hooks/useAuthentication.js +20 -0
  10. package/dist/cjs/global-account/react/stores/useAuthStore.d.ts +4 -0
  11. package/dist/cjs/global-account/react/stores/useAuthStore.js +4 -0
  12. package/dist/cjs/global-account/react/stores/useModalStore.d.ts +2 -0
  13. package/dist/esm/global-account/react/components/B3DynamicModal.js +1 -1
  14. package/dist/esm/global-account/react/components/ManageAccount/ManageAccount.js +6 -3
  15. package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3.js +3 -3
  16. package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +13 -1
  17. package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +3 -1
  18. package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStep.js +4 -1
  19. package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +3 -0
  20. package/dist/esm/global-account/react/hooks/useAuthentication.d.ts +1 -0
  21. package/dist/esm/global-account/react/hooks/useAuthentication.js +21 -1
  22. package/dist/esm/global-account/react/stores/useAuthStore.d.ts +4 -0
  23. package/dist/esm/global-account/react/stores/useAuthStore.js +4 -0
  24. package/dist/esm/global-account/react/stores/useModalStore.d.ts +2 -0
  25. package/dist/styles/index.css +1 -1
  26. package/dist/types/global-account/react/hooks/useAuthentication.d.ts +1 -0
  27. package/dist/types/global-account/react/stores/useAuthStore.d.ts +4 -0
  28. package/dist/types/global-account/react/stores/useModalStore.d.ts +2 -0
  29. package/package.json +1 -1
  30. package/src/global-account/react/components/B3DynamicModal.tsx +1 -6
  31. package/src/global-account/react/components/ManageAccount/ManageAccount.tsx +92 -82
  32. package/src/global-account/react/components/SignInWithB3/SignInWithB3.tsx +3 -3
  33. package/src/global-account/react/components/SignInWithB3/SignInWithB3Flow.tsx +13 -1
  34. package/src/global-account/react/components/SignInWithB3/SignInWithB3Privy.tsx +3 -1
  35. package/src/global-account/react/components/SignInWithB3/steps/LoginStep.tsx +5 -2
  36. package/src/global-account/react/components/SignInWithB3/steps/LoginStepCustom.tsx +3 -0
  37. package/src/global-account/react/hooks/useAuthentication.ts +24 -1
  38. package/src/global-account/react/stores/useAuthStore.ts +8 -0
  39. package/src/global-account/react/stores/useModalStore.ts +2 -0
  40. package/src/styles/index.css +5 -2
@@ -133,7 +133,7 @@ export function ManageAccount({
133
133
  const [unlinkingAccountId, setUnlinkingAccountId] = useState<string | null>(null);
134
134
  const { data: profilesRaw = [], isLoading: isLoadingProfiles } = useProfiles({ client });
135
135
  const { mutate: unlinkProfile, isPending: isUnlinking } = useUnlinkProfile();
136
- const { setB3ModalOpen, setB3ModalContentType, isLinking } = useModalStore();
136
+ const { setB3ModalOpen, setB3ModalContentType, isLinking, contentType } = useModalStore();
137
137
  const { user, setUser } = useB3();
138
138
  const [isUpdatingCode, setIsUpdatingCode] = useState(false);
139
139
  const [newReferralCode, setNewReferralCode] = useState("");
@@ -145,6 +145,7 @@ export function ManageAccount({
145
145
  { query: { referrerId: user?.userId } },
146
146
  !!user?.userId,
147
147
  );
148
+ const showReferralInfo = (contentType as ManageAccountModalProps)?.showReferralInfo ?? false;
148
149
 
149
150
  const mutationOptions = {
150
151
  onError: (error: Error) => {
@@ -305,22 +306,14 @@ export function ManageAccount({
305
306
  )}
306
307
  </div>
307
308
 
308
- {/* Referral Section */}
309
- <div className="space-y-4">
310
- <h3 className="text-b3-grey font-neue-montreal-semibold text-xl">Referrals</h3>
309
+ {showReferralInfo && (
310
+ /* Referral Section */
311
+ <div className="space-y-4">
312
+ <h3 className="text-b3-grey font-neue-montreal-semibold text-xl">Referrals</h3>
311
313
 
312
- {/* Referral Code */}
313
- <div className="bg-b3-line rounded-xl p-4">
314
- {isEditingCode && (
315
- <div>
316
- <div className="text-b3-grey font-neue-montreal-semibold">Your Referral Code</div>
317
- <div className="text-b3-foreground-muted font-neue-montreal-medium text-sm">
318
- Share this code with friends to earn rewards
319
- </div>
320
- </div>
321
- )}
322
- <div className="flex items-center justify-between">
323
- {!isEditingCode && (
314
+ {/* Referral Code */}
315
+ <div className="bg-b3-line rounded-xl p-4">
316
+ {isEditingCode && (
324
317
  <div>
325
318
  <div className="text-b3-grey font-neue-montreal-semibold">Your Referral Code</div>
326
319
  <div className="text-b3-foreground-muted font-neue-montreal-medium text-sm">
@@ -328,78 +321,95 @@ export function ManageAccount({
328
321
  </div>
329
322
  </div>
330
323
  )}
331
- <div className="flex items-center gap-2">
332
- {isEditingCode ? (
333
- <div className="flex items-center gap-2">
334
- <input
335
- type="text"
336
- value={newReferralCode}
337
- onChange={e => setNewReferralCode(e.target.value)}
338
- className="rounded-lg border border-gray-200 bg-white px-3 py-1.5 text-sm"
339
- placeholder="Enter new code"
340
- ref={referallCodeRef}
341
- />
342
- <Button size="sm" onClick={handleUpdateReferralCode} disabled={isUpdatingCode || !newReferralCode}>
343
- {isUpdatingCode ? <Loader2 className="h-4 w-4 animate-spin" /> : "Save"}
344
- </Button>
345
- <Button
346
- size="sm"
347
- variant="ghost"
348
- onClick={() => {
349
- setIsEditingCode(false);
350
- setNewReferralCode("");
351
- }}
352
- >
353
- Cancel
354
- </Button>
355
- </div>
356
- ) : (
357
- <>
358
- <div className="rounded-lg border border-gray-200 bg-white px-3 py-1.5 text-sm">
359
- {currentReferralCode}
324
+ <div className="flex items-center justify-between">
325
+ {!isEditingCode && (
326
+ <div>
327
+ <div className="text-b3-grey font-neue-montreal-semibold">Your Referral Code</div>
328
+ <div className="text-b3-foreground-muted font-neue-montreal-medium text-sm">
329
+ Share this code with friends to earn rewards
360
330
  </div>
361
- <Button size="icon" variant="ghost" onClick={handleCopyCode}>
362
- <Copy className="h-4 w-4" />
363
- </Button>
364
- <Button
365
- size="icon"
366
- variant="ghost"
367
- onClick={() => {
368
- setIsEditingCode(true);
369
- setTimeout(() => {
370
- referallCodeRef.current?.focus();
371
- }, 100);
372
- }}
373
- >
374
- <Pencil className="h-4 w-4" />
375
- </Button>
376
- </>
331
+ </div>
377
332
  )}
333
+ <div className="flex items-center gap-2">
334
+ {isEditingCode ? (
335
+ <div className="flex items-center gap-2">
336
+ <input
337
+ type="text"
338
+ value={newReferralCode}
339
+ onChange={e => setNewReferralCode(e.target.value)}
340
+ className="rounded-lg border border-gray-200 bg-white px-3 py-1.5 text-sm"
341
+ placeholder="Enter new code"
342
+ ref={referallCodeRef}
343
+ />
344
+ <Button
345
+ size="sm"
346
+ onClick={handleUpdateReferralCode}
347
+ disabled={isUpdatingCode || !newReferralCode}
348
+ >
349
+ {isUpdatingCode ? <Loader2 className="h-4 w-4 animate-spin" /> : "Save"}
350
+ </Button>
351
+ <Button
352
+ size="sm"
353
+ variant="ghost"
354
+ onClick={() => {
355
+ setIsEditingCode(false);
356
+ setNewReferralCode("");
357
+ }}
358
+ >
359
+ Cancel
360
+ </Button>
361
+ </div>
362
+ ) : (
363
+ <>
364
+ <div className="rounded-lg border border-gray-200 bg-white px-3 py-1.5 text-sm">
365
+ {currentReferralCode}
366
+ </div>
367
+ <Button size="icon" variant="ghost" onClick={handleCopyCode}>
368
+ <Copy className="h-4 w-4" />
369
+ </Button>
370
+ <Button
371
+ size="icon"
372
+ variant="ghost"
373
+ onClick={() => {
374
+ setIsEditingCode(true);
375
+ setTimeout(() => {
376
+ referallCodeRef.current?.focus();
377
+ }, 100);
378
+ }}
379
+ >
380
+ <Pencil className="h-4 w-4" />
381
+ </Button>
382
+ </>
383
+ )}
384
+ </div>
378
385
  </div>
379
386
  </div>
380
- </div>
381
387
 
382
- {/* Referred Users */}
383
- <div className="bg-b3-line rounded-xl p-4">
384
- <div className="text-b3-grey font-neue-montreal-semibold mb-4">Referred Users</div>
385
- {isLoadingReferrals ? (
386
- <div className="flex justify-center py-4">
387
- <Loader2 className="h-6 w-6 animate-spin text-gray-400" />
388
- </div>
389
- ) : referrals?.data?.length ? (
390
- <div className="space-y-3">
391
- {referrals.data.map((referral: Referrals) => (
392
- <div key={String(referral._id)} className="flex items-center justify-between rounded-lg bg-white p-3">
393
- <div className="text-sm font-medium">{referral.referreeId}</div>
394
- <div className="text-sm text-gray-500">{new Date(referral.createdAt).toLocaleDateString()}</div>
395
- </div>
396
- ))}
397
- </div>
398
- ) : (
399
- <div className="py-4 text-center text-gray-500">No referred users yet</div>
400
- )}
388
+ {/* Referred Users */}
389
+ <div className="bg-b3-line rounded-xl p-4">
390
+ <div className="text-b3-grey font-neue-montreal-semibold mb-4">Referred Users</div>
391
+ {isLoadingReferrals ? (
392
+ <div className="flex justify-center py-4">
393
+ <Loader2 className="h-6 w-6 animate-spin text-gray-400" />
394
+ </div>
395
+ ) : referrals?.data?.length ? (
396
+ <div className="space-y-3">
397
+ {referrals.data.map((referral: Referrals) => (
398
+ <div
399
+ key={String(referral._id)}
400
+ className="flex items-center justify-between rounded-lg bg-white p-3"
401
+ >
402
+ <div className="text-sm font-medium">{referral.referreeId}</div>
403
+ <div className="text-sm text-gray-500">{new Date(referral.createdAt).toLocaleDateString()}</div>
404
+ </div>
405
+ ))}
406
+ </div>
407
+ ) : (
408
+ <div className="py-4 text-center text-gray-500">No referred users yet</div>
409
+ )}
410
+ </div>
401
411
  </div>
402
- </div>
412
+ )}
403
413
 
404
414
  {/* Additional Settings Sections */}
405
415
  <div className="space-y-4">
@@ -21,7 +21,7 @@ export type SignInWithB3Props = Omit<SignInWithB3ModalProps, "type" | "showBackB
21
21
  export function SignInWithB3(props: SignInWithB3Props) {
22
22
  const { setB3ModalOpen, setB3ModalContentType, setEcoSystemAccountAddress } = useModalStore();
23
23
  const { account } = useB3();
24
- const { isAuthenticating, isConnected } = useAuthentication(props.partnerId, props.loginWithSiwe);
24
+ const { isAuthenticatingV2, isAuthenticated } = useAuthentication(props.partnerId, props.loginWithSiwe);
25
25
  const isMobile = useIsMobile();
26
26
 
27
27
  useEffect(() => {
@@ -39,11 +39,11 @@ export function SignInWithB3(props: SignInWithB3Props) {
39
39
  setB3ModalOpen(true);
40
40
  };
41
41
 
42
- if (isConnected) {
42
+ if (isAuthenticated) {
43
43
  return <ManageAccountButton {...props} />;
44
44
  }
45
45
 
46
- if (isAuthenticating) {
46
+ if (isAuthenticatingV2) {
47
47
  return (
48
48
  <StyleRoot>
49
49
  <Button disabled style={{ backgroundColor: "#3368ef" }} className="flex items-center gap-2 text-white">
@@ -41,6 +41,7 @@ export function SignInWithB3Flow({
41
41
  const { setB3ModalContentType, setB3ModalOpen, isOpen } = useModalStore();
42
42
  const account = useActiveAccount();
43
43
  const setIsAuthenticating = useAuthStore(state => state.setIsAuthenticating);
44
+ const setIsAuthenticatingV2 = useAuthStore(state => state.setIsAuthenticatingV2);
44
45
  const isAuthenticating = useAuthStore(state => state.isAuthenticating);
45
46
  const isConnected = useAuthStore(state => state.isConnected);
46
47
  const setIsConnected = useAuthStore(state => state.setIsConnected);
@@ -198,6 +199,7 @@ export function SignInWithB3Flow({
198
199
  if (loginWithSiwe) {
199
200
  debug("setIsAuthenticating:true:1");
200
201
  setIsAuthenticating(true);
202
+ setIsAuthenticatingV2(true);
201
203
  const userAuth = await authenticate(account, partnerId);
202
204
  setUser(userAuth.user);
203
205
  }
@@ -205,8 +207,18 @@ export function SignInWithB3Flow({
205
207
  onLoginSuccess?.(account);
206
208
  debug("setIsAuthenticating:false:1");
207
209
  setIsAuthenticating(false);
210
+ setIsAuthenticatingV2(false);
208
211
  },
209
- [loginWithSiwe, onLoginSuccess, setIsAuthenticating, authenticate, partnerId, setUser, setIsConnected],
212
+ [
213
+ loginWithSiwe,
214
+ onLoginSuccess,
215
+ setIsAuthenticating,
216
+ authenticate,
217
+ partnerId,
218
+ setUser,
219
+ setIsConnected,
220
+ setIsAuthenticatingV2,
221
+ ],
210
222
  );
211
223
 
212
224
  useEffect(() => {
@@ -21,6 +21,7 @@ interface SignInWithB3PrivyProps {
21
21
  export function SignInWithB3Privy({ onSuccess, onError, partnerId, chain }: SignInWithB3PrivyProps) {
22
22
  const { isLoading, connectTw, fullToken } = useHandleConnectWithPrivy(partnerId, chain, onSuccess);
23
23
  const setIsAuthenticating = useAuthStore(state => state.setIsAuthenticating);
24
+ const setIsAuthenticatingV2 = useAuthStore(state => state.setIsAuthenticatingV2);
24
25
  const setIsAuthenticated = useAuthStore(state => state.setIsAuthenticated);
25
26
  const { logout } = useAuthentication(partnerId);
26
27
 
@@ -48,10 +49,11 @@ export function SignInWithB3Privy({ onSuccess, onError, partnerId, chain }: Sign
48
49
  } finally {
49
50
  debug("setIsAuthenticating:false:7");
50
51
  setIsAuthenticating(false);
52
+ setIsAuthenticatingV2(false);
51
53
  }
52
54
  }
53
55
  autoConnect();
54
- }, [connectTw, onSuccess, onError, setIsAuthenticating, setIsAuthenticated, logout]);
56
+ }, [connectTw, onSuccess, onError, setIsAuthenticating, setIsAuthenticated, logout, setIsAuthenticatingV2]);
55
57
 
56
58
  // Currently we auto login, so we can show loading immediately and the onSuccess will proceed to the next modal
57
59
  return (
@@ -42,9 +42,9 @@ export function LoginStepContainer({ children, partnerId }: LoginStepContainerPr
42
42
  const partnerLogo = partner?.data?.[0]?.loginCustomization?.logoUrl;
43
43
 
44
44
  return (
45
- <div className="flex flex-col items-center justify-center">
45
+ <div className="flex flex-col items-center justify-center pt-6">
46
46
  {partnerLogo && (
47
- <img src={partnerLogo} alt="Partner Logo" className="partner-logo mb-6 mt-6 h-12 w-auto object-contain" />
47
+ <img src={partnerLogo} alt="Partner Logo" className="partner-logo mb-6 h-12 w-auto object-contain" />
48
48
  )}
49
49
  {children}
50
50
  <h2 className="mt-6 flex items-center gap-2 text-lg font-bold">
@@ -63,6 +63,7 @@ export function LoginStep({ onSuccess, onError, partnerId, chain }: LoginStepPro
63
63
 
64
64
  const { theme } = useB3();
65
65
  const setIsAuthenticating = useAuthStore(state => state.setIsAuthenticating);
66
+ const setIsAuthenticatingV2 = useAuthStore(state => state.setIsAuthenticatingV2);
66
67
  const setIsAuthenticated = useAuthStore(state => state.setIsAuthenticated);
67
68
  const { logout } = useAuthentication(partnerId);
68
69
 
@@ -117,6 +118,7 @@ export function LoginStep({ onSuccess, onError, partnerId, chain }: LoginStepPro
117
118
  onConnect={async wallet => {
118
119
  try {
119
120
  setIsAuthenticating(true);
121
+ setIsAuthenticatingV2(true);
120
122
  debug("setIsAuthenticating:true:6");
121
123
 
122
124
  const account = wallet.getAccount();
@@ -133,6 +135,7 @@ export function LoginStep({ onSuccess, onError, partnerId, chain }: LoginStepPro
133
135
  } finally {
134
136
  debug("setIsAuthenticating:false:6");
135
137
  setIsAuthenticating(false);
138
+ setIsAuthenticatingV2(false);
136
139
  }
137
140
  }}
138
141
  />
@@ -40,6 +40,7 @@ export function LoginStepCustom({
40
40
  const [showAllWallets, setShowAllWallets] = useState(false);
41
41
  const { connect } = useConnect(partnerId, chain);
42
42
  const setIsAuthenticating = useAuthStore(state => state.setIsAuthenticating);
43
+ const setIsAuthenticatingV2 = useAuthStore(state => state.setIsAuthenticatingV2);
43
44
  const setIsAuthenticated = useAuthStore(state => state.setIsAuthenticated);
44
45
  const { logout } = useAuthentication(partnerId);
45
46
  const { connect: connectTW } = useConnectTW();
@@ -55,6 +56,7 @@ export function LoginStepCustom({
55
56
  setIsLoading(true);
56
57
  debug("setIsAuthenticating:true:3");
57
58
  setIsAuthenticating(true);
59
+ setIsAuthenticatingV2(true);
58
60
  const options = getConnectOptionsFromStrategy(strategy);
59
61
  let connectResult: Wallet | null;
60
62
 
@@ -88,6 +90,7 @@ export function LoginStepCustom({
88
90
  setIsLoading(false);
89
91
  debug("setIsAuthenticating:false:3");
90
92
  setIsAuthenticating(false);
93
+ setIsAuthenticatingV2(false);
91
94
  }
92
95
  };
93
96
 
@@ -4,7 +4,7 @@ import { ecosystemWalletId } from "@b3dotfun/sdk/shared/constants";
4
4
  import { b3MainnetThirdWeb } from "@b3dotfun/sdk/shared/constants/chains/supported";
5
5
  import { debugB3React } from "@b3dotfun/sdk/shared/utils/debug";
6
6
  import { client } from "@b3dotfun/sdk/shared/utils/thirdweb";
7
- import { useEffect } from "react";
7
+ import { useEffect, useRef } from "react";
8
8
  import { useActiveWallet, useAutoConnect, useConnectedWallets, useDisconnect } from "thirdweb/react";
9
9
  import { ecosystemWallet } from "thirdweb/wallets";
10
10
  import { preAuthenticate } from "thirdweb/wallets/in-app";
@@ -27,6 +27,11 @@ export function useAuthentication(partnerId: string, loginWithSiwe?: boolean) {
27
27
  const setIsConnected = useAuthStore(state => state.setIsConnected);
28
28
  const isConnecting = useAuthStore(state => state.isConnecting);
29
29
  const isConnected = useAuthStore(state => state.isConnected);
30
+ const useAutoConnectLoadingPrevious = useRef(false);
31
+ const setIsAuthenticatingV2 = useAuthStore(state => state.setIsAuthenticatingV2);
32
+ const isAuthenticatingV2 = useAuthStore(state => state.isAuthenticatingV2);
33
+ const hasStartedConnecting = useAuthStore(state => state.hasStartedConnecting);
34
+ const setHasStartedConnecting = useAuthStore(state => state.setHasStartedConnecting);
30
35
  const { connect } = useConnect(partnerId, b3MainnetThirdWeb);
31
36
 
32
37
  const wallet = ecosystemWallet(ecosystemWalletId, {
@@ -37,11 +42,15 @@ export function useAuthentication(partnerId: string, loginWithSiwe?: boolean) {
37
42
  client,
38
43
  wallets: [wallet],
39
44
  onConnect: async wallet => {
45
+ setHasStartedConnecting(true);
46
+
40
47
  try {
41
48
  setIsConnected(true);
42
49
  if (!loginWithSiwe) {
43
50
  debug("Skipping SIWE login", { loginWithSiwe });
44
51
  setIsAuthenticated(true);
52
+
53
+ setIsAuthenticatingV2(false);
45
54
  return;
46
55
  }
47
56
  debug("setIsAuthenticating:true:4");
@@ -56,6 +65,7 @@ export function useAuthentication(partnerId: string, loginWithSiwe?: boolean) {
56
65
  const userAuth = await app.reAuthenticate();
57
66
  setUser(userAuth.user);
58
67
  setIsAuthenticated(true);
68
+ setIsAuthenticatingV2(false);
59
69
  debug("Re-authenticated successfully", { userAuth });
60
70
  } catch (error) {
61
71
  // If re-authentication fails, try fresh authentication
@@ -63,6 +73,7 @@ export function useAuthentication(partnerId: string, loginWithSiwe?: boolean) {
63
73
  const userAuth = await authenticate(account, partnerId);
64
74
  setUser(userAuth.user);
65
75
  setIsAuthenticated(true);
76
+ setIsAuthenticatingV2(false);
66
77
  debug("Fresh authentication successful", { userAuth });
67
78
  }
68
79
  } catch (error) {
@@ -71,9 +82,20 @@ export function useAuthentication(partnerId: string, loginWithSiwe?: boolean) {
71
82
  debug("setIsAuthenticating:false:4");
72
83
  setUser();
73
84
  }
85
+ setIsAuthenticatingV2(false);
74
86
  },
75
87
  });
76
88
 
89
+ /**
90
+ * useAutoConnectLoading starts as false
91
+ */
92
+ useEffect(() => {
93
+ if (!useAutoConnectLoading && useAutoConnectLoadingPrevious.current && !hasStartedConnecting) {
94
+ setIsAuthenticatingV2(false);
95
+ }
96
+ useAutoConnectLoadingPrevious.current = useAutoConnectLoading;
97
+ }, [useAutoConnectLoading]);
98
+
77
99
  // Ensure isAuthenticating stays true until we're fully ready
78
100
  useEffect(() => {
79
101
  if (useAutoConnectLoading) {
@@ -137,5 +159,6 @@ export function useAuthentication(partnerId: string, loginWithSiwe?: boolean) {
137
159
  wallet,
138
160
  preAuthenticate,
139
161
  connect,
162
+ isAuthenticatingV2,
140
163
  };
141
164
  }
@@ -27,6 +27,10 @@ interface AuthState {
27
27
  onError?: (error: Error) => void;
28
28
  }) => void;
29
29
  reset: () => void;
30
+ isAuthenticatingV2: boolean;
31
+ setIsAuthenticatingV2: (isAuthenticating: boolean) => void;
32
+ hasStartedConnecting: boolean;
33
+ setHasStartedConnecting: (hasStartedConnecting: boolean) => void;
30
34
  }
31
35
 
32
36
  export const useAuthStore = create<AuthState>(set => ({
@@ -69,4 +73,8 @@ export const useAuthStore = create<AuthState>(set => ({
69
73
  onSuccess: undefined,
70
74
  onError: undefined,
71
75
  }),
76
+ isAuthenticatingV2: true,
77
+ setIsAuthenticatingV2: isAuthenticating => set({ isAuthenticatingV2: isAuthenticating }),
78
+ hasStartedConnecting: false,
79
+ setHasStartedConnecting: hasStartedConnecting => set({ hasStartedConnecting }),
72
80
  }));
@@ -87,6 +87,8 @@ export interface ManageAccountModalProps extends BaseModalProps {
87
87
  activeTab?: "overview" | "tokens" | "nfts" | "apps" | "settings";
88
88
  /** Function to set the active tab */
89
89
  setActiveTab?: (tab: "overview" | "tokens" | "nfts" | "apps" | "settings") => void;
90
+ /** Whether to show the referral information */
91
+ showReferralInfo?: boolean;
90
92
  }
91
93
 
92
94
  /**
@@ -343,8 +343,7 @@ Dark version
343
343
  @apply bg-b3-react-background;
344
344
  }
345
345
  .b3-modal .css-1m9ejup,
346
- .b3-modal .css-1cv2836,
347
- .b3-modal .css-1d4s0we img[width="24"] {
346
+ .b3-modal .css-1cv2836 {
348
347
  display: none !important;
349
348
  }
350
349
 
@@ -386,6 +385,10 @@ Dark version
386
385
  }
387
386
 
388
387
  .b3-login-step {
388
+ & > div > div > div > div > div > div > div > img {
389
+ display: none;
390
+ }
391
+
389
392
  /* Input fields styling */
390
393
  & input {
391
394
  color: hsl(var(--b3-react-foreground)) !important;