@getpara/react-sdk 2.0.0-alpha.24 → 2.0.0-alpha.26

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.
@@ -48,12 +48,12 @@ const ParaModal = forwardRef((props, ref) => {
48
48
  const { setSelectedWallet, updateSelectedWallet } = useWalletState();
49
49
  const setAuthStepRoute = useModalStore((state) => state.setAuthStepRoute);
50
50
  const { signUpOrLogIn, isCreateGuestWalletsPending } = useAuthActions();
51
- const { data: account } = useAccount();
51
+ const { data: account, status: statusAccount } = useAccount();
52
52
  const [isModalMounted, setIsModalMounted] = useState(false);
53
- const [isInit, setIsInit] = useState(false);
54
53
  const externalWallets = useStore((state) => state.externalWallets);
55
54
  const providerProps = useStore((state) => state.providerProps);
56
55
  const setAccountLinkOptions = useModalStore((state) => state.setAccountLinkOptions);
56
+ const isInitialized = useRef(false);
57
57
  const _a = __spreadValues(__spreadValues({}, storedModalConfig), props), {
58
58
  isOpen: configIsOpen,
59
59
  theme,
@@ -133,7 +133,7 @@ const ParaModal = forwardRef((props, ref) => {
133
133
  }, [hasPreviousStep, currentStep]);
134
134
  const initModal = (shouldAutoLogin) => __async(void 0, null, function* () {
135
135
  var _a2;
136
- const isAccount = yield para.isFullyLoggedIn(), isGuest = isAccount && para.isGuestMode || isCreateGuestWalletsPending;
136
+ const isAccount = account == null ? void 0 : account.isConnected, isGuest = isAccount && para.isGuestMode || isCreateGuestWalletsPending;
137
137
  switch (true) {
138
138
  case !!currentStepOverride:
139
139
  setStep(ModalStep[currentStepOverride.toUpperCase()]);
@@ -175,8 +175,17 @@ const ParaModal = forwardRef((props, ref) => {
175
175
  }
176
176
  break;
177
177
  }
178
- setIsInit(true);
179
178
  });
179
+ useEffect(() => {
180
+ if (para && isOpen && statusAccount === "success" && !isInitialized.current) {
181
+ initModal(isOpen);
182
+ isInitialized.current = true;
183
+ }
184
+ if (para && !isOpen && isInitialized.current) {
185
+ initModal();
186
+ isInitialized.current = false;
187
+ }
188
+ }, [para, isOpen, account, statusAccount]);
180
189
  useEffect(() => {
181
190
  let _authLayout = authLayout;
182
191
  if (!(externalWallets == null ? void 0 : externalWallets.length) && hasExternalWallet(authLayout)) {
@@ -197,18 +206,6 @@ const ParaModal = forwardRef((props, ref) => {
197
206
  useEffect(() => {
198
207
  setOnModalStepChange(onModalStepChange);
199
208
  }, [onModalStepChange]);
200
- useEffect(() => {
201
- if (para) {
202
- initModal();
203
- } else {
204
- console.error("A Para instance must be provided.");
205
- }
206
- }, []);
207
- useEffect(() => {
208
- if (isOpen && para) {
209
- initModal(true);
210
- }
211
- }, [isOpen]);
212
209
  useEffect(() => {
213
210
  updateSelectedWallet();
214
211
  }, [para]);
@@ -236,10 +233,6 @@ const ParaModal = forwardRef((props, ref) => {
236
233
  } else if (RESET_TO_ACCOUNT_STEPS.includes(currentStep)) {
237
234
  setStep(ModalStep.LOGIN_DONE);
238
235
  }
239
- if (para) {
240
- yield initModal();
241
- }
242
- setIsInit(false);
243
236
  });
244
237
  if (!para) {
245
238
  console.error("A Para instance is required.");
@@ -275,7 +268,7 @@ const ParaModal = forwardRef((props, ref) => {
275
268
  className,
276
269
  "data-testid": "modal",
277
270
  $embeddedModal: !!embeddedModal,
278
- children: isModalMounted && ((embeddedModal || bareModal) && isInit || !embeddedModal && !bareModal) && /* @__PURE__ */ jsx(
271
+ children: isModalMounted && ((embeddedModal || bareModal) && isInitialized.current || !embeddedModal && !bareModal) && /* @__PURE__ */ jsx(
279
272
  ModalContent,
280
273
  __spreadValues({
281
274
  oAuthMethods,
@@ -4,7 +4,6 @@ import {
4
4
  __spreadValues
5
5
  } from "../../../chunk-MMUBH76A.js";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
- import styled from "styled-components";
8
7
  import { AccountTypeIcon, GradientScroll, StepContainer } from "../common.js";
9
8
  import { CpslButton, CpslIcon, CpslIdenticon, CpslText } from "@getpara/react-components";
10
9
  import { useAccount, useClient } from "../../../provider/index.js";
@@ -117,7 +116,7 @@ const AccountProfile = () => {
117
116
  ] })
118
117
  ] });
119
118
  };
120
- const Section = styled.div`
119
+ const Section = safeStyled.div`
121
120
  display: flex;
122
121
  flex-direction: column;
123
122
  align-items: flex-start;
@@ -125,8 +124,8 @@ const Section = styled.div`
125
124
  gap: 16px;
126
125
  width: 100%;
127
126
  `;
128
- const Content = styled(Section)``;
129
- const Title = styled(CpslText)``;
127
+ const Content = safeStyled(Section)``;
128
+ const Title = safeStyled(CpslText)``;
130
129
  const EntryContainer = safeStyled.div`
131
130
  position: relative;
132
131
  width: 100%;
@@ -152,7 +151,7 @@ const CopyIcon = safeStyled(CpslIcon)`
152
151
  --icon-color: var(--cpsl-color-text-contrast);
153
152
  }
154
153
  `;
155
- const EntryUnlink = styled.a`
154
+ const EntryUnlink = safeStyled.a`
156
155
  color: var(--cpsl-color-utility-red);
157
156
  position: absolute;
158
157
  right: 0;
@@ -3,7 +3,6 @@ import "../../../chunk-MMUBH76A.js";
3
3
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
4
  import { AuthInput } from "../AuthInput/AuthInput.js";
5
5
  import { AccountTypeIcon, GradientScroll, StepContainer } from "../common.js";
6
- import styled from "styled-components";
7
6
  import { CpslButton, CpslDivider, CpslText } from "@getpara/react-components";
8
7
  import { getAccountTypeName } from "../../constants/oAuthLogos.js";
9
8
  import { useExternalWallets } from "../../../provider/providers/ExternalWalletProvider.js";
@@ -11,6 +10,7 @@ import { useAccountLinking } from "../../../provider/providers/AccountLinkProvid
11
10
  import { useEffect, useMemo } from "react";
12
11
  import { EXTERNAL_WALLET_TYPES } from "@getpara/web-sdk";
13
12
  import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
13
+ import { safeStyled } from "@getpara/react-common";
14
14
  function isExternalWallet(str) {
15
15
  return EXTERNAL_WALLET_TYPES.includes(str);
16
16
  }
@@ -92,14 +92,14 @@ function AccountProfileLinkOptions() {
92
92
  }) })
93
93
  ] }) });
94
94
  }
95
- const Content = styled.div`
95
+ const Content = safeStyled.div`
96
96
  display: flex;
97
97
  flex-direction: column;
98
98
  align-items: flex-start;
99
99
  gap: 8px;
100
100
  width: 100%;
101
101
  `;
102
- const Option = styled(CpslButton)`
102
+ const Option = safeStyled(CpslButton)`
103
103
  --button-justify-content: flex-start;
104
104
 
105
105
  height: 48px;
@@ -5,8 +5,8 @@ import { CpslButton, CpslText } from "@getpara/react-components";
5
5
  import { useEffect, useState } from "react";
6
6
  import { AccountTypeIcon } from "../common.js";
7
7
  import { getAccountTypeName } from "../../constants/oAuthLogos.js";
8
- import styled from "styled-components";
9
8
  import { useAccountLinking } from "../../../provider/providers/AccountLinkProvider.js";
9
+ import { safeStyled } from "@getpara/react-common";
10
10
  function AccountProfileUnlink() {
11
11
  var _a, _b;
12
12
  const { unlinkingAccount, unlinkAccountConfirm, isUnlinkAccountPending } = useAccountLinking(), [accountType, setAccountType] = useState((_b = (_a = unlinkingAccount == null ? void 0 : unlinkingAccount.externalWallet) == null ? void 0 : _a.providerId) != null ? _b : unlinkingAccount == null ? void 0 : unlinkingAccount.type);
@@ -28,17 +28,17 @@ function AccountProfileUnlink() {
28
28
  /* @__PURE__ */ jsx(CpslButton, { variant: "destructive", fullWidth: true, onClick: unlinkAccountConfirm, disabled: isUnlinkAccountPending, children: "Confirm" })
29
29
  ] });
30
30
  }
31
- const Content = styled.div`
31
+ const Content = safeStyled.div`
32
32
  display: flex;
33
33
  flex-direction: column;
34
34
  align-items: center;
35
35
  justify-content: flex-start;
36
36
  gap: 32px;
37
37
  `;
38
- const Upper = styled(Content)`
38
+ const Upper = safeStyled(Content)`
39
39
  gap: 8px;
40
40
  `;
41
- const Message = styled(CpslText)`
41
+ const Message = safeStyled(CpslText)`
42
42
  text-align: center;
43
43
  max-width: 342px;
44
44
  `;
@@ -1,6 +1,5 @@
1
1
  "use client";
2
2
  import {
3
- __async,
4
3
  __spreadProps,
5
4
  __spreadValues
6
5
  } from "../../../chunk-MMUBH76A.js";
@@ -63,12 +62,6 @@ const ModalContent = forwardRef(
63
62
  }
64
63
  }, [onRampTestMode]);
65
64
  useEffect(() => {
66
- const init = () => __async(void 0, null, function* () {
67
- if (!(yield para.isFullyLoggedIn())) {
68
- yield disconnectExternalWallet();
69
- }
70
- });
71
- init();
72
65
  return () => {
73
66
  var _a;
74
67
  window.clearTimeout((_a = refs.poll.current) == null ? void 0 : _a.timeout);
@@ -119,7 +119,7 @@ const BODY_MOTION_VARIANTS = {
119
119
  const BODY_TRANSITION = {
120
120
  duration: 0.2
121
121
  };
122
- const SDK_VERSION = "2.0.0-alpha.23";
122
+ const SDK_VERSION = "2.0.0-alpha.25";
123
123
  export {
124
124
  BODY_MOTION_VARIANTS,
125
125
  BODY_TRANSITION,
@@ -22,5 +22,5 @@ export type Account = ({
22
22
  isConnected: true;
23
23
  isGuestMode: false;
24
24
  } & AccountValue);
25
- export declare const getAccount: (para?: ParaWeb) => Promise<Account>;
25
+ export declare const getAccount: (para?: ParaWeb, isConnected?: boolean) => Promise<Account>;
26
26
  export {};
@@ -4,16 +4,19 @@ import {
4
4
  __spreadProps,
5
5
  __spreadValues
6
6
  } from "../../chunk-MMUBH76A.js";
7
- const getAccount = (para) => __async(void 0, null, function* () {
8
- if (!!para && para.isGuestMode) {
7
+ const getAccount = (para, isConnected) => __async(void 0, null, function* () {
8
+ if (!para) {
9
+ return { isConnected: false };
10
+ }
11
+ if (para.isGuestMode) {
9
12
  return {
10
13
  isConnected: true,
11
14
  isGuestMode: true,
12
15
  wallets: para.availableWallets
13
16
  };
14
17
  }
15
- const isConnected = !!para && (yield para == null ? void 0 : para.isFullyLoggedIn());
16
- if (isConnected) {
18
+ const _isConnected = isConnected != null ? isConnected : yield para == null ? void 0 : para.isFullyLoggedIn();
19
+ if (_isConnected) {
17
20
  const authInfo = para.authInfo;
18
21
  const value = __spreadProps(__spreadValues({}, authInfo || {}), {
19
22
  userId: para.userId,
@@ -2,4 +2,4 @@ import ParaWeb, { TWalletType } from '@getpara/web-sdk';
2
2
  export declare const getWallet: (para?: ParaWeb, selectedWallet?: {
3
3
  id?: string;
4
4
  type?: TWalletType;
5
- }) => Promise<Omit<import("@getpara/web-sdk").Wallet, "signer"> | null | undefined>;
5
+ }, isConnected?: boolean) => Promise<Omit<import("@getpara/web-sdk").Wallet, "signer"> | null | undefined>;
@@ -2,9 +2,12 @@
2
2
  import {
3
3
  __async
4
4
  } from "../../chunk-MMUBH76A.js";
5
- const getWallet = (para, selectedWallet) => __async(void 0, null, function* () {
6
- const isLoggedIn = yield para == null ? void 0 : para.isFullyLoggedIn();
7
- if (!para || !isLoggedIn) {
5
+ const getWallet = (para, selectedWallet, isConnected) => __async(void 0, null, function* () {
6
+ if (!para) {
7
+ return null;
8
+ }
9
+ const isLoggedIn = isConnected != null ? isConnected : yield para == null ? void 0 : para.isFullyLoggedIn();
10
+ if (!isLoggedIn) {
8
11
  return null;
9
12
  }
10
13
  return para.findWallet(selectedWallet == null ? void 0 : selectedWallet.id, selectedWallet == null ? void 0 : selectedWallet.type);
@@ -1,4 +1,4 @@
1
1
  import ParaWeb, { CoreMethodName, CoreMethodParams, CoreMethodResponse, CoreMethods, InternalAction, InternalMethodName, InternalMethods } from '@getpara/web-sdk';
2
- export type CoreAction<method extends CoreMethodName & keyof CoreMethods> = (para?: ParaWeb, ...args: [CoreMethodParams<method>]) => Promise<Awaited<CoreMethodResponse<method>>>;
2
+ export type CoreAction<method extends CoreMethodName & keyof CoreMethods> = (para?: ParaWeb, ...args: [CoreMethodParams<method>] | []) => Promise<Awaited<CoreMethodResponse<method>>>;
3
3
  export declare function generateCoreAction<const method extends CoreMethodName & keyof CoreMethods>(method: method): CoreAction<method>;
4
4
  export declare function generateInternalAction<const method extends InternalMethodName & keyof InternalMethods>(method: method): InternalAction<method>;
@@ -1,2 +1,4 @@
1
- export declare const useLinkedAccounts: () => import("../../types/utils.js").CoreMethodQueryHook<"getLinkedAccounts">;
2
- export declare const useAccountLinkInProgress: () => import("../../types/utils.js").CoreMethodQueryHook<"accountLinkInProgress">;
1
+ export declare const useLinkedAccounts: (params?: {
2
+ withMetadata?: boolean;
3
+ } | undefined) => import("../../types/utils.js").CoreMethodQueryHook<"getLinkedAccounts">;
4
+ export declare const useAccountLinkInProgress: (params?: undefined) => import("../../types/utils.js").CoreMethodQueryHook<"accountLinkInProgress">;
@@ -2,10 +2,13 @@
2
2
  import "../../../chunk-MMUBH76A.js";
3
3
  import * as actions from "../../actions/index.js";
4
4
  import { generateCoreQueryHook } from "./utils.js";
5
- const useLinkedAccounts = generateCoreQueryHook("getLinkedAccounts", actions.getLinkedAccounts);
5
+ const useLinkedAccounts = generateCoreQueryHook("getLinkedAccounts", actions.getLinkedAccounts, {
6
+ defaultParams: { withMetadata: false }
7
+ });
6
8
  const useAccountLinkInProgress = generateCoreQueryHook(
7
9
  "accountLinkInProgress",
8
- actions.accountLinkInProgress
10
+ actions.accountLinkInProgress,
11
+ { isGetter: true }
9
12
  );
10
13
  export {
11
14
  useAccountLinkInProgress,
@@ -1,4 +1,5 @@
1
1
  export declare const ACCOUNT_BASE_KEY = "PARA_ACCOUNT";
2
+ export declare const useIsFullyLoggedIn: () => import("@tanstack/react-query").UseQueryResult<boolean, Error>;
2
3
  /**
3
4
  * Hook for retrieving a user account
4
5
  */
@@ -6,16 +6,30 @@ import { useQuery } from "@tanstack/react-query";
6
6
  import { getAccount } from "../../actions/getAccount.js";
7
7
  import { useInternalClient } from "../utils/useInternalClient.js";
8
8
  const ACCOUNT_BASE_KEY = "PARA_ACCOUNT";
9
+ const useIsFullyLoggedIn = () => {
10
+ const client = useInternalClient();
11
+ return useQuery({
12
+ staleTime: 5e3,
13
+ queryKey: ["isFullyLoggedIn", client == null ? void 0 : client.getUserId()],
14
+ queryFn: () => __async(void 0, null, function* () {
15
+ return yield client == null ? void 0 : client.isFullyLoggedIn();
16
+ })
17
+ });
18
+ };
9
19
  const useAccount = () => {
20
+ var _a, _b;
10
21
  const client = useInternalClient();
22
+ const { data: isFullyLoggedIn, isSuccess } = useIsFullyLoggedIn();
11
23
  return useQuery({
12
- queryKey: [ACCOUNT_BASE_KEY, client == null ? void 0 : client.getUserId()],
24
+ enabled: isSuccess && !!client,
25
+ queryKey: [ACCOUNT_BASE_KEY, isFullyLoggedIn != null ? isFullyLoggedIn : null, (_a = client == null ? void 0 : client.userId) != null ? _a : null, (_b = client == null ? void 0 : client.isGuestMode) != null ? _b : null],
13
26
  queryFn: () => __async(void 0, null, function* () {
14
- return yield getAccount(client);
27
+ return yield getAccount(client, isFullyLoggedIn);
15
28
  })
16
29
  });
17
30
  };
18
31
  export {
19
32
  ACCOUNT_BASE_KEY,
20
- useAccount
33
+ useAccount,
34
+ useIsFullyLoggedIn
21
35
  };
@@ -4,15 +4,18 @@ import {
4
4
  } from "../../../chunk-MMUBH76A.js";
5
5
  import { useQuery } from "@tanstack/react-query";
6
6
  import { useClient, useWalletState } from "../index.js";
7
+ import { useIsFullyLoggedIn } from "./useAccount.js";
7
8
  import { getWallet } from "../../actions/getWallet.js";
8
9
  const WALLET_BASE_KEY = "PARA_WALLET";
9
10
  const useWallet = () => {
10
11
  const client = useClient();
11
12
  const { selectedWallet } = useWalletState();
13
+ const { data: isFullyLoggedIn, isSuccess } = useIsFullyLoggedIn();
12
14
  return useQuery({
13
- queryKey: [WALLET_BASE_KEY, client == null ? void 0 : client.getUserId(), selectedWallet.id, selectedWallet.type],
15
+ enabled: !!client && !!selectedWallet && isSuccess,
16
+ queryKey: [WALLET_BASE_KEY, isFullyLoggedIn, selectedWallet.id, selectedWallet.type],
14
17
  queryFn: () => __async(void 0, null, function* () {
15
- return yield getWallet(client, selectedWallet);
18
+ return yield getWallet(client, selectedWallet, isFullyLoggedIn);
16
19
  })
17
20
  });
18
21
  };
@@ -1,4 +1,7 @@
1
- import ParaWeb, { CoreMethodName, CoreMethods } from '@getpara/web-sdk';
1
+ import { CoreMethodName, CoreMethodParams, CoreMethods } from '@getpara/web-sdk';
2
2
  import { CoreMethodQueryHook } from '../../types/utils.js';
3
3
  import { CoreAction } from '../../actions/utils.js';
4
- export declare function generateCoreQueryHook<const method extends CoreMethodName & keyof CoreMethods>(method: method, action: CoreAction<method> & ((_: ParaWeb) => Promise<unknown>)): () => CoreMethodQueryHook<method>;
4
+ export declare function generateCoreQueryHook<const method extends CoreMethodName & keyof CoreMethods>(method: method, action: CoreAction<method>, { isGetter, defaultParams }?: {
5
+ isGetter?: boolean;
6
+ defaultParams?: CoreMethodParams<method>;
7
+ }): (params?: CoreMethodParams<method>) => CoreMethodQueryHook<method>;
@@ -4,16 +4,17 @@ import {
4
4
  } from "../../../chunk-MMUBH76A.js";
5
5
  import { useClient } from "../utils/index.js";
6
6
  import { useQuery } from "@tanstack/react-query";
7
- function generateCoreQueryHook(method, action) {
8
- return () => {
7
+ function generateCoreQueryHook(method, action, { isGetter = false, defaultParams } = {}) {
8
+ return (params = defaultParams) => {
9
+ var _a;
9
10
  const para = useClient();
10
11
  return useQuery({
11
- queryKey: [method],
12
- queryFn: () => __async(this, null, function* () {
12
+ queryKey: [method, params != null ? params : null, isGetter ? (_a = para == null ? void 0 : para[method]) != null ? _a : null : null],
13
+ queryFn: (_0) => __async(this, [_0], function* ({ queryKey: [_, params2] }) {
13
14
  if (!para) {
14
15
  return null;
15
16
  }
16
- const result = yield action(para);
17
+ const result = params2 ? yield action(para, params2) : defaultParams ? yield action(para, defaultParams) : yield action(para);
17
18
  return result != null ? result : null;
18
19
  })
19
20
  });
@@ -112,7 +112,7 @@ const AccountLinkProvider = ({ children }) => {
112
112
  } = useVerifyExternalWalletLink();
113
113
  const isEnabled = !!(account == null ? void 0 : account.isConnected) && !(account == null ? void 0 : account.isGuestMode) && (!(account == null ? void 0 : account.externalWallet) || includeWalletVerification);
114
114
  const [accountLinkInProgress, setAccountLinkInProgress] = useState(
115
- coreAccountLinkInProgress
115
+ coreAccountLinkInProgress || void 0
116
116
  );
117
117
  const [unlinkingAccount, setUnlinkingAccount] = useState(void 0);
118
118
  const [linkAccountError, setLinkAccountError] = useState(null);
@@ -347,7 +347,7 @@ const AccountLinkProvider = ({ children }) => {
347
347
  };
348
348
  useEffect(() => {
349
349
  setAccountLinkInProgress((prev) => {
350
- return coreAccountLinkInProgress != null ? coreAccountLinkInProgress : prev;
350
+ return coreAccountLinkInProgress || prev;
351
351
  });
352
352
  }, [coreAccountLinkInProgress]);
353
353
  useEffect(() => {
@@ -34,6 +34,7 @@ import { isExternalWallet } from "@getpara/user-management-client";
34
34
  import { routeMobileExternalWallet } from "../../modal/utils/routeMobileExternalWallet.js";
35
35
  import { useStore } from "../stores/useStore.js";
36
36
  import { useFormattedBiometricHints } from "../hooks/utils/useFormattedBiometricHints.js";
37
+ import { useQueryClient } from "@tanstack/react-query";
37
38
  const AuthContext = createContext({
38
39
  signUpOrLogIn: () => {
39
40
  },
@@ -68,6 +69,7 @@ function AuthProvider({
68
69
  isRecoverySecretStepEnabled = false,
69
70
  overrides = {}
70
71
  }) {
72
+ const queryClient = useQueryClient();
71
73
  const para = useInternalClient();
72
74
  const userAgent = useUserAgent();
73
75
  const onLoginRef = useStore((state) => state.onLoginRef);
@@ -375,6 +377,7 @@ function AuthProvider({
375
377
  on2faNotSetup
376
378
  } = {}) {
377
379
  var _a;
380
+ yield queryClient.invalidateQueries({ queryKey: ["isFullyLoggedIn"] });
378
381
  setAuthState();
379
382
  yield (_a = onLoginRef.current) == null ? void 0 : _a.call(onLoginRef);
380
383
  if (is2faEnabled) {
@@ -24,7 +24,7 @@ export type CoreMethodQuery<method extends CoreMethodName & keyof CoreMethods> =
24
24
  export type CoreGetterQuery<name extends keyof typeof ParaWeb> = Query<(typeof ParaWeb)[name] | null, Error>;
25
25
  export type CoreMethodMutationState<method extends CoreMethodName & keyof CoreMethods> = MutationState<Awaited<CoreMethodResponse<method>>, Error, CoreMethodParams<method> | void, unknown>;
26
26
  export type CoreMethodMutationHook<method extends CoreMethodName & keyof CoreMethods> = Compute<CoreMethodUseMutationReturnType<method> & CoreSyncMutationHook<method> & CoreAsyncMutationHook<method>>;
27
- export type CoreMethodQueryHook<method extends CoreMethodName & keyof CoreMethods> = UseQueryResult<Awaited<CoreMethodResponse<method>>, Error>;
27
+ export type CoreMethodQueryHook<method extends CoreMethodName & keyof CoreMethods> = UseQueryResult<Awaited<CoreMethodResponse<method>> | null, Error>;
28
28
  export type CoreGetterQueryHook<name extends keyof typeof ParaWeb> = UseQueryResult<(typeof ParaWeb)[name] | null, Error>;
29
29
  export type CoreMethodMutationStateHook<method extends CoreMethodName & keyof CoreMethods> = () => Omit<CoreMethodUseMutationReturnType<method>, 'reset'>;
30
30
  type InternalSyncMutationHook<method extends InternalMethodName & keyof InternalMethods> = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpara/react-sdk",
3
- "version": "2.0.0-alpha.24",
3
+ "version": "2.0.0-alpha.26",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -15,9 +15,9 @@
15
15
  "*.css"
16
16
  ],
17
17
  "dependencies": {
18
- "@getpara/react-common": "2.0.0-alpha.24",
19
- "@getpara/react-components": "2.0.0-alpha.24",
20
- "@getpara/web-sdk": "2.0.0-alpha.24",
18
+ "@getpara/react-common": "2.0.0-alpha.26",
19
+ "@getpara/react-components": "2.0.0-alpha.26",
20
+ "@getpara/web-sdk": "2.0.0-alpha.26",
21
21
  "date-fns": "^3.6.0",
22
22
  "framer-motion": "11.3.28",
23
23
  "libphonenumber-js": "^1.11.1",
@@ -33,9 +33,9 @@
33
33
  "cli": "node ./dist/cli/cli.mjs"
34
34
  },
35
35
  "devDependencies": {
36
- "@getpara/cosmos-wallet-connectors": "2.0.0-alpha.24",
37
- "@getpara/evm-wallet-connectors": "2.0.0-alpha.24",
38
- "@getpara/solana-wallet-connectors": "2.0.0-alpha.24",
36
+ "@getpara/cosmos-wallet-connectors": "2.0.0-alpha.26",
37
+ "@getpara/evm-wallet-connectors": "2.0.0-alpha.26",
38
+ "@getpara/solana-wallet-connectors": "2.0.0-alpha.26",
39
39
  "@testing-library/dom": "^10.4.0",
40
40
  "@testing-library/react": "^16.3.0",
41
41
  "@testing-library/react-hooks": "^8.0.1",
@@ -63,5 +63,5 @@
63
63
  "resolutions": {
64
64
  "styled-components": "^6"
65
65
  },
66
- "gitHead": "bc885e0cfe1efeacab0f72b0a68c5af2710e32e0"
66
+ "gitHead": "c97be88dd7414041f25d6f4b9758ea26dcfb2694"
67
67
  }