@getpara/react-sdk-lite 2.0.0-alpha.53 → 2.0.0-dev.6

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 (45) hide show
  1. package/dist/modal/ParaModal.js +1 -0
  2. package/dist/modal/components/Account/AccountProfileLink.js +3 -3
  3. package/dist/modal/components/AddFunds/AddFunds.js +2 -3
  4. package/dist/modal/components/AddFunds/AddFundsContext.d.ts +5 -5
  5. package/dist/modal/components/AwaitingAccountStep/AwaitingAccountStep.d.ts +1 -0
  6. package/dist/modal/components/{AwaitingIFrameStep/AwaitingIFrameStep.js → AwaitingAccountStep/AwaitingAccountStep.js} +2 -2
  7. package/dist/modal/components/Body/Body.js +37 -88
  8. package/dist/modal/components/Header/hooks/useStepTitle.js +1 -1
  9. package/dist/modal/components/OAuth/FarcasterLink.d.ts +2 -0
  10. package/dist/modal/components/OAuth/FarcasterLink.js +30 -0
  11. package/dist/modal/components/OAuth/FarcasterOAuthStep.d.ts +1 -3
  12. package/dist/modal/components/OAuth/FarcasterOAuthStep.js +47 -26
  13. package/dist/modal/components/OAuth/OAuth.js +2 -2
  14. package/dist/modal/components/OAuth/TelegramOAuthStep.js +2 -1
  15. package/dist/modal/components/common.d.ts +3 -3
  16. package/dist/modal/constants/constants.d.ts +8 -8
  17. package/dist/modal/constants/constants.js +25 -25
  18. package/dist/modal/hooks/useFarcasterLogin.d.ts +9 -0
  19. package/dist/modal/hooks/useFarcasterLogin.js +70 -0
  20. package/dist/modal/hooks/useTelegramLogin.d.ts +4 -3
  21. package/dist/modal/hooks/useTelegramLogin.js +11 -3
  22. package/dist/modal/stores/modal/actions.js +0 -1
  23. package/dist/modal/stores/modal/useModalStore.d.ts +0 -2
  24. package/dist/modal/stores/modal/useModalStore.js +0 -1
  25. package/dist/modal/utils/steps.d.ts +6 -3
  26. package/dist/modal/utils/steps.js +14 -8
  27. package/dist/modal/utils/stringFormatters.d.ts +2 -2
  28. package/dist/provider/ParaProviderMin.js +3 -4
  29. package/dist/provider/actions/index.d.ts +9 -9
  30. package/dist/provider/components/ExternalWalletWrapper.js +0 -5
  31. package/dist/provider/hooks/mutations/useCreatePregenWallet.d.ts +3 -3
  32. package/dist/provider/hooks/mutations/useSignUpOrLogIn.d.ts +3 -3
  33. package/dist/provider/hooks/mutations/useVerifyFarcaster.d.ts +6 -3
  34. package/dist/provider/hooks/mutations/useVerifyNewAccount.d.ts +3 -3
  35. package/dist/provider/hooks/mutations/useVerifyOAuth.d.ts +3 -3
  36. package/dist/provider/hooks/mutations/useVerifyTelegram.d.ts +9 -6
  37. package/dist/provider/providers/AccountLinkProvider.js +1 -1
  38. package/dist/provider/providers/AuthProvider.d.ts +4 -3
  39. package/dist/provider/providers/AuthProvider.js +102 -50
  40. package/dist/provider/providers/ExternalWalletProvider.js +6 -14
  41. package/dist/provider/stores/types.d.ts +2 -2
  42. package/package.json +8 -8
  43. package/dist/modal/components/AwaitingIFrameStep/AwaitingIFrameStep.d.ts +0 -1
  44. package/dist/modal/utils/renderTextWithLinks.d.ts +0 -2
  45. package/dist/modal/utils/renderTextWithLinks.js +0 -34
@@ -16,12 +16,13 @@ export declare const VERIFY_TELEGRAM_KEY = "VERIFY_TELEGRAM";
16
16
  */
17
17
  export declare const useVerifyTelegram: () => {
18
18
  status: "error" | "idle" | "pending" | "success";
19
- data: Compute<import("@getpara/core-sdk/dist/types/types/methods.js").AuthStateSignupOrLogin> | undefined;
19
+ data: Compute<import("@getpara/core-sdk/dist/types/types/methods.js").AuthStateSignupOrLoginOrDone> | undefined;
20
20
  isSuccess: boolean;
21
21
  variables: {
22
22
  portalTheme?: import("@getpara/web-sdk").Theme | undefined;
23
23
  useShortUrls?: boolean | undefined;
24
- telegramAuthResponse: import("@getpara/web-sdk").TelegramAuthResponse;
24
+ telegramAuthResponse?: import("@getpara/web-sdk").TelegramAuthResponse | undefined;
25
+ serverAuthState?: import("@getpara/user-management-client").VerifyThirdPartyAuth | undefined;
25
26
  } | undefined;
26
27
  error: Error | null;
27
28
  isError: boolean;
@@ -33,14 +34,16 @@ export declare const useVerifyTelegram: () => {
33
34
  failureReason: Error | null;
34
35
  isPaused: boolean;
35
36
  submittedAt: number;
36
- verifyTelegram: import("@tanstack/react-query").UseMutateFunction<Compute<import("@getpara/core-sdk/dist/types/types/methods.js").AuthStateSignupOrLogin>, Error, {
37
+ verifyTelegram: import("@tanstack/react-query").UseMutateFunction<Compute<import("@getpara/core-sdk/dist/types/types/methods.js").AuthStateSignupOrLoginOrDone>, Error, {
37
38
  portalTheme?: import("@getpara/web-sdk").Theme | undefined;
38
39
  useShortUrls?: boolean | undefined;
39
- telegramAuthResponse: import("@getpara/web-sdk").TelegramAuthResponse;
40
+ telegramAuthResponse?: import("@getpara/web-sdk").TelegramAuthResponse | undefined;
41
+ serverAuthState?: import("@getpara/user-management-client").VerifyThirdPartyAuth | undefined;
40
42
  }, unknown>;
41
- verifyTelegramAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Compute<import("@getpara/core-sdk/dist/types/types/methods.js").AuthStateSignupOrLogin>, Error, {
43
+ verifyTelegramAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Compute<import("@getpara/core-sdk/dist/types/types/methods.js").AuthStateSignupOrLoginOrDone>, Error, {
42
44
  portalTheme?: import("@getpara/web-sdk").Theme | undefined;
43
45
  useShortUrls?: boolean | undefined;
44
- telegramAuthResponse: import("@getpara/web-sdk").TelegramAuthResponse;
46
+ telegramAuthResponse?: import("@getpara/web-sdk").TelegramAuthResponse | undefined;
47
+ serverAuthState?: import("@getpara/user-management-client").VerifyThirdPartyAuth | undefined;
45
48
  }, unknown>;
46
49
  };
@@ -114,7 +114,7 @@ const AccountLinkProvider = ({ children }) => {
114
114
  reset: resetVerifyExternalWalletLink
115
115
  } = useVerifyExternalWalletLink();
116
116
  const { embedded } = account;
117
- const isEnabled = (embedded == null ? void 0 : embedded.isConnected) || !(embedded == null ? void 0 : embedded.isGuestMode) && (!((_a = para.authInfo) == null ? void 0 : _a.externalWallet) || includeWalletVerification || externalWalletsWithFullAuth === "ALL" || externalWalletsWithFullAuth.includes((_c = (_b = para.authInfo) == null ? void 0 : _b.externalWallet) == null ? void 0 : _c.providerId));
117
+ const isEnabled = (embedded == null ? void 0 : embedded.isConnected) || !(embedded == null ? void 0 : embedded.isGuestMode) && (!((_a = para.authInfo) == null ? void 0 : _a.externalWallet) || includeWalletVerification || externalWalletsWithFullAuth.includes((_c = (_b = para.authInfo) == null ? void 0 : _b.externalWallet) == null ? void 0 : _c.providerId));
118
118
  const [accountLinkInProgress, setAccountLinkInProgress] = useState(
119
119
  coreAccountLinkInProgress || void 0
120
120
  );
@@ -2,7 +2,7 @@ import { BiometricHints } from '@getpara/react-common';
2
2
  import { PropsWithChildren } from 'react';
3
3
  import { AuthMethod, CoreMethodParams, AuthState, AuthStateSignup, AuthStateLogin } from '@getpara/web-sdk';
4
4
  import { ParaModalProps } from '../../modal/types/modalProps.js';
5
- import { TelegramAuthResponse, VerifiedAuth } from '@getpara/user-management-client';
5
+ import { VerifiedAuth, VerifyThirdPartyAuth } from '@getpara/user-management-client';
6
6
  import { MutationStatus } from '@tanstack/react-query';
7
7
  type Value = {
8
8
  signUpOrLogIn: (_: VerifiedAuth) => void;
@@ -11,9 +11,10 @@ type Value = {
11
11
  verifyNewAccountStatus: MutationStatus;
12
12
  verifyNewAccountError: Error | null;
13
13
  verifyOAuth: (_: CoreMethodParams<'verifyOAuth'>['method']) => void;
14
- verifyFarcaster: () => void;
15
- verifyTelegram: (_: TelegramAuthResponse) => void;
14
+ verifyFarcaster: (_?: VerifyThirdPartyAuth) => void;
15
+ verifyTelegram: (_: VerifyThirdPartyAuth) => void;
16
16
  verifyTelegramStatus: MutationStatus;
17
+ verifyFarcasterStatus: MutationStatus;
17
18
  onNewAuthState: (_: AuthState) => void;
18
19
  presentSignupUi: (_: AuthMethod, __: AuthStateSignup) => void;
19
20
  presentLoginUi: (_: AuthMethod, __: AuthStateLogin) => void;
@@ -51,6 +51,7 @@ const AuthContext = createContext({
51
51
  verifyTelegram: () => {
52
52
  },
53
53
  verifyTelegramStatus: "idle",
54
+ verifyFarcasterStatus: "idle",
54
55
  onNewAuthState: () => {
55
56
  },
56
57
  isSetup2faPending: false,
@@ -103,7 +104,7 @@ function AuthProvider({
103
104
  error: verifyNewAccountError
104
105
  } = useVerifyNewAccount();
105
106
  const { verifyOAuth: mutateVerifyOAuth } = useVerifyOAuth();
106
- const { verifyFarcaster: mutateVerifyFarcaster } = useVerifyFarcaster();
107
+ const { verifyFarcaster: mutateVerifyFarcaster, status: verifyFarcasterStatus } = useVerifyFarcaster();
107
108
  const { verifyTelegram: mutateVerifyTelegram, status: verifyTelegramStatus } = useVerifyTelegram();
108
109
  const { waitForLogin: mutateWaitForLogin } = useWaitForLogin();
109
110
  const { waitForSignup: mutateWaitForSignup } = useWaitForSignup();
@@ -135,13 +136,13 @@ function AuthProvider({
135
136
  setAuthStepRoute();
136
137
  setIFrameUrl();
137
138
  setIsIFrameReady(false);
138
- setStep(ModalStep.AWAITING_IFRAME);
139
+ setStep(ModalStep.AWAITING_ACCOUNT);
139
140
  }
140
141
  window.removeEventListener("message", handleMessage);
141
142
  }
142
143
  });
143
144
  };
144
- const signup = () => {
145
+ const pollSignup = () => {
145
146
  if (typeof window !== "undefined") {
146
147
  refs.poll.current = {
147
148
  action: "signup",
@@ -152,10 +153,11 @@ function AuthProvider({
152
153
  ModalStep.BIOMETRIC_CREATION,
153
154
  ModalStep.AWAITING_BIOMETRIC_CREATION,
154
155
  ModalStep.PASSWORD_CREATION,
155
- ModalStep.AWAITING_IFRAME,
156
+ ModalStep.AWAITING_ACCOUNT,
156
157
  ModalStep.VERIFICATIONS,
157
158
  ModalStep.AWAITING_OAUTH,
158
- ModalStep.EXTERNAL_WALLET_VERIFICATION
159
+ ModalStep.EXTERNAL_WALLET_VERIFICATION,
160
+ ModalStep.OTP
159
161
  ]),
160
162
  onPoll: () => {
161
163
  goBackIfPopupClosedOnSteps([ModalStep.AWAITING_BIOMETRIC_CREATION]);
@@ -173,7 +175,7 @@ function AuthProvider({
173
175
  }
174
176
  },
175
177
  onError: () => {
176
- if (refs.currentStep.current && [ModalStep.AWAITING_BIOMETRIC_CREATION, ModalStep.PASSWORD_CREATION, ModalStep.AWAITING_IFRAME].includes(
178
+ if (refs.currentStep.current && [ModalStep.AWAITING_BIOMETRIC_CREATION, ModalStep.PASSWORD_CREATION, ModalStep.AWAITING_ACCOUNT].includes(
177
179
  refs.currentStep.current
178
180
  )) {
179
181
  goBack();
@@ -229,6 +231,23 @@ function AuthProvider({
229
231
  },
230
232
  [isIFrameReady]
231
233
  );
234
+ const presentVerifyUi = useCallback(
235
+ (method, authState) => {
236
+ switch (method) {
237
+ case AuthMethod.SLO:
238
+ setupListener();
239
+ if (isIFrameReady) {
240
+ setStep(ModalStep.OTP);
241
+ } else {
242
+ setIFrameUrl(authState.loginUrl);
243
+ setIsIFrameReady(false);
244
+ setAuthStepRoute(ModalStep.OTP);
245
+ }
246
+ break;
247
+ }
248
+ },
249
+ [isIFrameReady]
250
+ );
232
251
  const login = (authState) => {
233
252
  if (authState.isWalletSelectionNeeded || authState.passkeyUrl) {
234
253
  setStep(ModalStep.BIOMETRIC_LOGIN);
@@ -238,47 +257,54 @@ function AuthProvider({
238
257
  setIsIFrameReady(false);
239
258
  setStep(ModalStep.EMBEDDED_PASSWORD_LOGIN);
240
259
  }
241
- refs.poll.current = {
242
- action: "login",
243
- timeout: window == null ? void 0 : window.setTimeout(() => __async(this, null, function* () {
244
- mutateWaitForLogin(
245
- {
246
- isCanceled: () => cancelIfExitedSteps([
247
- ModalStep.BIOMETRIC_LOGIN,
248
- ModalStep.EMBEDDED_PASSWORD_LOGIN,
249
- ModalStep.AWAITING_BIOMETRIC_LOGIN,
250
- ModalStep.AWAITING_PASSWORD_LOGIN,
251
- ModalStep.AWAITING_IFRAME
252
- ]),
253
- onPoll: () => {
254
- goBackIfPopupClosedOnSteps([
260
+ pollLogin();
261
+ };
262
+ const pollLogin = () => {
263
+ if (typeof window !== "undefined") {
264
+ refs.poll.current = {
265
+ action: "login",
266
+ timeout: window == null ? void 0 : window.setTimeout(() => __async(this, null, function* () {
267
+ mutateWaitForLogin(
268
+ {
269
+ isCanceled: () => cancelIfExitedSteps([
270
+ ModalStep.BIOMETRIC_LOGIN,
271
+ ModalStep.EMBEDDED_PASSWORD_LOGIN,
255
272
  ModalStep.AWAITING_BIOMETRIC_LOGIN,
256
273
  ModalStep.AWAITING_PASSWORD_LOGIN,
257
- ModalStep.EMBEDDED_PASSWORD_LOGIN
258
- ]);
259
- }
260
- },
261
- {
262
- onSuccess: ({ needsWallet }) => {
263
- if (needsWallet && !para.isNoWalletConfig) {
264
- createWallets();
265
- } else {
266
- onLoginComplete({
267
- on2faSetupOrError: () => setStep(ModalStep.LOGIN_DONE),
268
- on2faNotSetup: () => setStep(ModalStep.SETUP_2FA)
269
- });
274
+ ModalStep.AWAITING_ACCOUNT,
275
+ ModalStep.OTP
276
+ ]),
277
+ onPoll: () => {
278
+ goBackIfPopupClosedOnSteps([
279
+ ModalStep.AWAITING_BIOMETRIC_LOGIN,
280
+ ModalStep.AWAITING_PASSWORD_LOGIN,
281
+ ModalStep.EMBEDDED_PASSWORD_LOGIN,
282
+ ModalStep.OTP
283
+ ]);
270
284
  }
271
285
  },
272
- onSettled: () => {
273
- var _a;
274
- window == null ? void 0 : window.clearTimeout((_a = refs.poll.current) == null ? void 0 : _a.timeout);
275
- refs.poll.current = null;
276
- refs.popupWindow.current = null;
286
+ {
287
+ onSuccess: ({ needsWallet }) => {
288
+ if (needsWallet && !para.isNoWalletConfig) {
289
+ createWallets();
290
+ } else {
291
+ onLoginComplete({
292
+ on2faSetupOrError: () => setStep(ModalStep.LOGIN_DONE),
293
+ on2faNotSetup: () => setStep(ModalStep.SETUP_2FA)
294
+ });
295
+ }
296
+ },
297
+ onSettled: () => {
298
+ var _a;
299
+ window == null ? void 0 : window.clearTimeout((_a = refs.poll.current) == null ? void 0 : _a.timeout);
300
+ refs.poll.current = null;
301
+ refs.popupWindow.current = null;
302
+ }
277
303
  }
278
- }
279
- );
280
- }), DEFAULTS.LOGGIN_POLLING_DELAY_MS)
281
- };
304
+ );
305
+ }), DEFAULTS.LOGGIN_POLLING_DELAY_MS)
306
+ };
307
+ }
282
308
  };
283
309
  const presentLoginUi = useCallback(
284
310
  (method, authState) => {
@@ -313,7 +339,20 @@ function AuthProvider({
313
339
  if (isExternalWallet(authState.auth) && authState.signatureVerificationMessage) {
314
340
  setStep(ModalStep.EXTERNAL_WALLET_VERIFICATION);
315
341
  } else {
316
- setStep(ModalStep.VERIFICATIONS);
342
+ if (authState.nextStage === "login") {
343
+ setFlow("login");
344
+ pollLogin();
345
+ } else {
346
+ setFlow("signup");
347
+ pollSignup();
348
+ }
349
+ if (authState.loginUrl) {
350
+ setIFrameUrl(authState.loginUrl);
351
+ setIsIFrameReady(false);
352
+ presentVerifyUi(AuthMethod.SLO, authState);
353
+ } else {
354
+ setStep(ModalStep.VERIFICATIONS);
355
+ }
317
356
  }
318
357
  break;
319
358
  case "login":
@@ -330,7 +369,7 @@ function AuthProvider({
330
369
  setIFrameUrl(authState.passwordUrl || authState.pinUrl);
331
370
  setIsIFrameReady(false);
332
371
  }
333
- signup();
372
+ pollSignup();
334
373
  if (isPasswordOrPINOnly) {
335
374
  presentSignupUi(isPassword ? AuthMethod.PASSWORD : AuthMethod.PIN, authState);
336
375
  } else {
@@ -338,6 +377,16 @@ function AuthProvider({
338
377
  }
339
378
  }
340
379
  break;
380
+ case "done":
381
+ if (authState.isNewUser) {
382
+ pollSignup();
383
+ setFlow("signup");
384
+ } else {
385
+ pollLogin();
386
+ setFlow("login");
387
+ }
388
+ setStep(ModalStep.AWAITING_ACCOUNT);
389
+ break;
341
390
  }
342
391
  });
343
392
  const signUpOrLogIn = (auth) => __async(this, null, function* () {
@@ -381,7 +430,7 @@ function AuthProvider({
381
430
  }
382
431
  );
383
432
  });
384
- const verifyFarcaster = () => __async(this, null, function* () {
433
+ const verifyFarcaster = (serverAuthState) => __async(this, null, function* () {
385
434
  setStep(ModalStep.FARCASTER_OAUTH);
386
435
  mutateVerifyFarcaster(
387
436
  {
@@ -390,7 +439,8 @@ function AuthProvider({
390
439
  setFarcasterConnectUri(connectUri);
391
440
  routeMobileExternalWallet(connectUri);
392
441
  },
393
- useShortUrls: true
442
+ useShortUrls: true,
443
+ serverAuthState
394
444
  },
395
445
  {
396
446
  onSuccess: onNewAuthState,
@@ -402,10 +452,10 @@ function AuthProvider({
402
452
  }
403
453
  );
404
454
  });
405
- const verifyTelegram = (telegramAuthResponse) => __async(this, null, function* () {
455
+ const verifyTelegram = (serverAuthState) => __async(this, null, function* () {
406
456
  mutateVerifyTelegram(
407
457
  {
408
- telegramAuthResponse,
458
+ serverAuthState,
409
459
  useShortUrls: true
410
460
  },
411
461
  {
@@ -511,7 +561,8 @@ function AuthProvider({
511
561
  createGuestWallets,
512
562
  isCreateGuestWalletsPending,
513
563
  logout,
514
- biometricHints: biometricHints || void 0
564
+ biometricHints: biometricHints || void 0,
565
+ verifyFarcasterStatus
515
566
  }),
516
567
  [
517
568
  presentSignupUi,
@@ -531,7 +582,8 @@ function AuthProvider({
531
582
  createGuestWallets,
532
583
  isCreateGuestWalletsPending,
533
584
  logout,
534
- biometricHints
585
+ biometricHints,
586
+ verifyFarcasterStatus
535
587
  ]
536
588
  );
537
589
  useEffect(() => {
@@ -124,11 +124,11 @@ function ExternalWalletProvider({ children }) {
124
124
  (w) => (w.internalId !== "FARCASTER" || (para == null ? void 0 : para.isFarcasterMiniApp)) && externalWallets.includes(w.internalId)
125
125
  ).sort(
126
126
  (a, b) => externalWallets.indexOf(a.internalId) - externalWallets.indexOf(b.internalId)
127
- );
127
+ ).sort((a, b) => a.installed === b.installed ? 0 : a.installed ? -1 : 1);
128
128
  const injectedWallets = allWallets.filter(
129
129
  (w) => (w == null ? void 0 : w.id) !== "Para" && !wallets.some((wallet2) => wallet2.id === w.id) && w.installed
130
130
  );
131
- wallets = [...wallets, ...injectedWallets].sort((a, b) => a.installed === b.installed ? 0 : a.installed ? -1 : 1);
131
+ wallets = [...wallets, ...injectedWallets];
132
132
  const wallet = useMemo(
133
133
  () => wallets.find((w) => w.id === (selectedExternalWallet == null ? void 0 : selectedExternalWallet.id) && w.type === (selectedExternalWallet == null ? void 0 : selectedExternalWallet.type)),
134
134
  [wallets, selectedExternalWallet]
@@ -147,15 +147,6 @@ function ExternalWalletProvider({ children }) {
147
147
  setQrUri(void 0);
148
148
  }
149
149
  }, [wallet]);
150
- const isWithFullAuth = (wallet2) => {
151
- if (connectionOnly) {
152
- return false;
153
- }
154
- if (externalWalletsWithFullAuth === "ALL") {
155
- return true;
156
- }
157
- return !!wallet2.name && externalWalletsWithFullAuth.includes(wallet2.name.toUpperCase());
158
- };
159
150
  const getWalletBalance = useCallback(() => __async(this, null, function* () {
160
151
  var _a;
161
152
  const walletType = (_a = Object.values(para.externalWallets || {})[0]) == null ? void 0 : _a.type;
@@ -246,13 +237,14 @@ function ExternalWalletProvider({ children }) {
246
237
  [evmSwitchChain, cosmosSwitchChain]
247
238
  );
248
239
  const verifyWalletSignature = useCallback(() => __async(this, null, function* () {
240
+ var _a;
249
241
  setExternalWalletError();
250
242
  const wallet2 = Object.values(para.externalWallets)[0];
251
243
  const walletType = wallet2 == null ? void 0 : wallet2.type;
252
244
  let verifyExternalWalletParams;
253
245
  const withVerification = includeWalletVerification;
254
246
  const isConnectionOnly = connectionOnly;
255
- const withFullParaAuth = (wallet2 == null ? void 0 : wallet2.name) ? isWithFullAuth(wallet2) : false;
247
+ const withFullParaAuth = (wallet2 == null ? void 0 : wallet2.name) ? externalWalletsWithFullAuth.includes(wallet2.name.toUpperCase()) : false;
256
248
  const defaultWalletInfo = {
257
249
  withVerification,
258
250
  isConnectionOnly,
@@ -330,7 +322,7 @@ function ExternalWalletProvider({ children }) {
330
322
  try {
331
323
  const d = yield verifyExternalWalletAsync(verifyExternalWalletParams);
332
324
  yield queryClient.refetchQueries({ queryKey: [IS_FULLY_LOGGED_IN_BASE_KEY] });
333
- if (wallet2 && isWithFullAuth(wallet2)) {
325
+ if (wallet2 && (externalWalletsWithFullAuth == null ? void 0 : externalWalletsWithFullAuth.includes((_a = wallet2.name) == null ? void 0 : _a.toUpperCase()))) {
334
326
  yield onNewAuthState(d);
335
327
  } else {
336
328
  setStep(ModalStep.LOGIN_DONE);
@@ -420,7 +412,7 @@ function ExternalWalletProvider({ children }) {
420
412
  return;
421
413
  }
422
414
  } else if (address) {
423
- if (!!authState && (isWithFullAuth(wallet2) || includeWalletVerification)) {
415
+ if (!!authState && ((externalWalletsWithFullAuth == null ? void 0 : externalWalletsWithFullAuth.includes(wallet2.name.toUpperCase())) || includeWalletVerification)) {
424
416
  onNewAuthState(authState);
425
417
  } else {
426
418
  setStep(ModalStep.LOGIN_DONE);
@@ -53,8 +53,8 @@ export interface ExternalWalletsSlice {
53
53
  setConnectionOnly: (_: boolean) => void;
54
54
  includeWalletVerification: boolean;
55
55
  setIncludeWalletVerification: (_: boolean) => void;
56
- externalWalletsWithFullAuth: TExternalWallet[] | 'ALL';
57
- setExternalWalletsWithFullAuth: (_: TExternalWallet[] | 'ALL') => void;
56
+ externalWalletsWithFullAuth: TExternalWallet[];
57
+ setExternalWalletsWithFullAuth: (_: TExternalWallet[]) => void;
58
58
  evmLib: typeof paraEvmLib | undefined;
59
59
  setEvmLib: (_: typeof paraEvmLib) => void;
60
60
  evmContext: Context<EvmExternalWalletContextType>;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@getpara/react-sdk-lite",
3
- "version": "2.0.0-alpha.53",
3
+ "version": "2.0.0-dev.6",
4
4
  "bin": {
5
5
  "setup-para": "dist/cli/cli.mjs"
6
6
  },
7
7
  "dependencies": {
8
- "@getpara/react-common": "2.0.0-alpha.53",
9
- "@getpara/react-components": "2.0.0-alpha.53",
10
- "@getpara/web-sdk": "2.0.0-alpha.53",
8
+ "@getpara/react-common": "2.0.0-dev.6",
9
+ "@getpara/react-components": "2.0.0-dev.6",
10
+ "@getpara/web-sdk": "2.0.0-dev.6",
11
11
  "date-fns": "^3.6.0",
12
12
  "framer-motion": "^11.3.31",
13
13
  "libphonenumber-js": "^1.11.7",
@@ -16,9 +16,9 @@
16
16
  "zustand-sync-tabs": "^0.2.2"
17
17
  },
18
18
  "devDependencies": {
19
- "@getpara/cosmos-wallet-connectors": "2.0.0-alpha.53",
20
- "@getpara/evm-wallet-connectors": "2.0.0-alpha.53",
21
- "@getpara/solana-wallet-connectors": "2.0.0-alpha.53",
19
+ "@getpara/cosmos-wallet-connectors": "2.0.0-dev.6",
20
+ "@getpara/evm-wallet-connectors": "2.0.0-dev.6",
21
+ "@getpara/solana-wallet-connectors": "2.0.0-dev.6",
22
22
  "@tanstack/react-query": "^5.74.0",
23
23
  "@testing-library/dom": "^10.4.0",
24
24
  "@testing-library/react": "^16.3.0",
@@ -38,7 +38,7 @@
38
38
  "package.json",
39
39
  "styles.css"
40
40
  ],
41
- "gitHead": "ad18fa268a41b0e4c080fa8349553fb546983513",
41
+ "gitHead": "c2125e37c73a19f11978031f5aa2eab39b978c56",
42
42
  "main": "dist/index.js",
43
43
  "peerDependencies": {
44
44
  "@tanstack/react-query": ">=5.0.0",
@@ -1 +0,0 @@
1
- export declare const AwaitingIFrameStep: () => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { ReactElement } from 'react';
2
- export declare const renderTextWithLinks: (text: string) => ReactElement[];
@@ -1,34 +0,0 @@
1
- "use client";
2
- import "../../chunk-MMUBH76A.js";
3
- import { jsx } from "react/jsx-runtime";
4
- import { Fragment } from "react";
5
- const renderTextWithLinks = (text) => {
6
- if (!text) return [/* @__PURE__ */ jsx(Fragment, { children: "" }, 0)];
7
- const linkStyle = { color: "inherit", textDecoration: "underline", fontWeight: "500" };
8
- const combinedRegex = /(\[([^\]]+)\]\((https?:\/\/[^)]+)\))|(https?:\/\/[^\s]+)/g;
9
- const parts = [];
10
- let lastIndex = 0;
11
- let match;
12
- while ((match = combinedRegex.exec(text)) !== null) {
13
- if (match.index > lastIndex) {
14
- parts.push(/* @__PURE__ */ jsx(Fragment, { children: text.slice(lastIndex, match.index) }, parts.length));
15
- }
16
- if (match[1]) {
17
- parts.push(
18
- /* @__PURE__ */ jsx("a", { href: match[3], target: "_blank", rel: "noopener noreferrer", style: linkStyle, children: match[2] }, parts.length)
19
- );
20
- } else if (match[4]) {
21
- parts.push(
22
- /* @__PURE__ */ jsx("a", { href: match[4], target: "_blank", rel: "noopener noreferrer", style: linkStyle, children: match[4] }, parts.length)
23
- );
24
- }
25
- lastIndex = match.index + match[0].length;
26
- }
27
- if (lastIndex < text.length) {
28
- parts.push(/* @__PURE__ */ jsx(Fragment, { children: text.slice(lastIndex) }, parts.length));
29
- }
30
- return parts.length ? parts : [/* @__PURE__ */ jsx(Fragment, { children: text }, 0)];
31
- };
32
- export {
33
- renderTextWithLinks
34
- };