@getpara/react-sdk-lite 2.0.0-alpha.61 → 2.0.0-alpha.63
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.
- package/dist/modal/ParaModal.js +3 -2
- package/dist/modal/components/Footer/Footer.js +3 -3
- package/dist/modal/constants/constants.js +1 -1
- package/dist/provider/components/ExternalWalletWrapper.js +3 -2
- package/dist/provider/hooks/queries/useAccount.js +1 -1
- package/dist/provider/providers/AccountLinkProvider.js +1 -2
- package/dist/provider/providers/AuthProvider.js +2 -1
- package/package.json +8 -8
package/dist/modal/ParaModal.js
CHANGED
|
@@ -57,6 +57,7 @@ const ParaModal = forwardRef((props, ref) => {
|
|
|
57
57
|
const externalWallets = useStore((state) => state.externalWallets);
|
|
58
58
|
const providerProps = useStore((state) => state.providerProps);
|
|
59
59
|
const setAccountLinkOptions = useModalStore((state) => state.setAccountLinkOptions);
|
|
60
|
+
const selectedExternalWallet = useModalStore((state) => state.selectedExternalWallet);
|
|
60
61
|
const isInitialized = useRef(false);
|
|
61
62
|
const _a = __spreadValues(__spreadValues({}, storedModalConfig), props), {
|
|
62
63
|
isOpen: configIsOpen,
|
|
@@ -223,10 +224,10 @@ const ParaModal = forwardRef((props, ref) => {
|
|
|
223
224
|
updateSelectedWallet();
|
|
224
225
|
}, [para]);
|
|
225
226
|
useEffect(() => {
|
|
226
|
-
if (bareModal && !isAccountLoading && !isConnected && !["signup", "login"].includes(flow != null ? flow : "") && modalRefs.currentStep.current !== ModalStep.AUTH_MAIN) {
|
|
227
|
+
if (bareModal && !selectedExternalWallet && !isAccountLoading && !isConnected && !["signup", "login"].includes(flow != null ? flow : "") && modalRefs.currentStep.current !== ModalStep.AUTH_MAIN) {
|
|
227
228
|
setStep(ModalStep.AUTH_MAIN);
|
|
228
229
|
}
|
|
229
|
-
}, [bareModal, flow, isConnected, isAccountLoading]);
|
|
230
|
+
}, [bareModal, flow, isConnected, isAccountLoading, selectedExternalWallet]);
|
|
230
231
|
useEffect(() => {
|
|
231
232
|
setAccountLinkOptions(propsSupportedAccountLinks != null ? propsSupportedAccountLinks : para == null ? void 0 : para.supportedAccountLinks);
|
|
232
233
|
}, [propsSupportedAccountLinks, para == null ? void 0 : para.supportedAccountLinks]);
|
|
@@ -6,11 +6,11 @@ import { CpslIcon, CpslText } from "@getpara/react-components";
|
|
|
6
6
|
import { PARA_TERMS_AND_CONDITIONS } from "../../constants/constants.js";
|
|
7
7
|
import { useModalStore } from "../../stores/index.js";
|
|
8
8
|
import { ModalStep } from "../../utils/steps.js";
|
|
9
|
-
import {
|
|
9
|
+
import { useAccountLinking } from "../../../provider/providers/AccountLinkProvider.js";
|
|
10
10
|
const Footer = () => {
|
|
11
|
-
const { isConnected } = useAccount();
|
|
12
11
|
const currentStep = useModalStore((state) => state.step);
|
|
13
|
-
const
|
|
12
|
+
const { accountLinkInProgress } = useAccountLinking();
|
|
13
|
+
const showFooter = !accountLinkInProgress && [
|
|
14
14
|
ModalStep.AUTH_MAIN,
|
|
15
15
|
ModalStep.AUTH_MORE,
|
|
16
16
|
ModalStep.EX_WALLET_NETWORK_SELECT,
|
|
@@ -12,6 +12,7 @@ import { CosmosWalletWrapper } from "./CosmosWalletWrapper.js";
|
|
|
12
12
|
import { SolanaWalletWrapper } from "./SolanaWalletWrapper.js";
|
|
13
13
|
import { useStore } from "../stores/useStore.js";
|
|
14
14
|
import { useInternalClient } from "../hooks/utils/useInternalClient.js";
|
|
15
|
+
import { EVM_WALLETS } from "@getpara/web-sdk";
|
|
15
16
|
const ExternalWalletWrapper = ({
|
|
16
17
|
children,
|
|
17
18
|
config
|
|
@@ -23,8 +24,8 @@ const ExternalWalletWrapper = ({
|
|
|
23
24
|
const wallets = useStore((state) => state.externalWallets);
|
|
24
25
|
const para = useInternalClient();
|
|
25
26
|
useEffect(() => {
|
|
26
|
-
if (!!wallets.length && !(walletConnect == null ? void 0 : walletConnect.projectId)) {
|
|
27
|
-
para.
|
|
27
|
+
if (!!wallets.length && !(walletConnect == null ? void 0 : walletConnect.projectId) && wallets.some((wallet) => EVM_WALLETS.includes(wallet))) {
|
|
28
|
+
para.displayModalError(
|
|
28
29
|
"It is recommended to provide a WalletConnect project id to ensure wallet connection works as expected. Refer to our docs at [https://docs.getpara.com/v2/react/guides/external-wallets/evm#configure-the-providers](https://docs.getpara.com/v2/react/guides/external-wallets/evm#configure-the-providers) for configuration details and sign up for your free key at [https://cloud.walletconnect.com/sign-in](https://cloud.walletconnect.com/sign-in)"
|
|
29
30
|
);
|
|
30
31
|
console.warn(
|
|
@@ -74,7 +74,7 @@ const useAccount = ({ cosmos } = {}) => {
|
|
|
74
74
|
connectionType = "external";
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
const isEmbeddedConnected =
|
|
77
|
+
const isEmbeddedConnected = connectionType === "embedded" || connectionType === "both";
|
|
78
78
|
const connectedNetworks = [];
|
|
79
79
|
if (evmAccount == null ? void 0 : evmAccount.isConnected) {
|
|
80
80
|
connectedNetworks.push("evm");
|
|
@@ -70,7 +70,7 @@ const AccountLinkProvider = ({ children }) => {
|
|
|
70
70
|
var _a, _b, _c;
|
|
71
71
|
const para = useInternalClient();
|
|
72
72
|
const queryClient = useQueryClient();
|
|
73
|
-
const
|
|
73
|
+
const { embedded } = useAccount();
|
|
74
74
|
const { data: coreAccountLinkInProgress } = useAccountLinkInProgress();
|
|
75
75
|
const {
|
|
76
76
|
wallets,
|
|
@@ -112,7 +112,6 @@ const AccountLinkProvider = ({ children }) => {
|
|
|
112
112
|
status: statusVerifyExternalWalletLink,
|
|
113
113
|
reset: resetVerifyExternalWalletLink
|
|
114
114
|
} = useVerifyExternalWalletLink();
|
|
115
|
-
const { embedded } = account;
|
|
116
115
|
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
116
|
const [accountLinkInProgress, setAccountLinkInProgress] = useState(
|
|
118
117
|
coreAccountLinkInProgress || void 0
|
|
@@ -277,7 +277,8 @@ function AuthProvider({
|
|
|
277
277
|
ModalStep.AWAITING_ACCOUNT,
|
|
278
278
|
ModalStep.OTP,
|
|
279
279
|
ModalStep.FARCASTER_OAUTH,
|
|
280
|
-
ModalStep.TELEGRAM_OAUTH
|
|
280
|
+
ModalStep.TELEGRAM_OAUTH,
|
|
281
|
+
ModalStep.AWAITING_OAUTH
|
|
281
282
|
]),
|
|
282
283
|
onPoll: () => {
|
|
283
284
|
goBackIfPopupClosedOnSteps([
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/react-sdk-lite",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.63",
|
|
4
4
|
"bin": {
|
|
5
5
|
"setup-para": "dist/cli/cli.mjs"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@getpara/react-common": "2.0.0-alpha.
|
|
9
|
-
"@getpara/react-components": "2.0.0-alpha.
|
|
10
|
-
"@getpara/web-sdk": "2.0.0-alpha.
|
|
8
|
+
"@getpara/react-common": "2.0.0-alpha.63",
|
|
9
|
+
"@getpara/react-components": "2.0.0-alpha.63",
|
|
10
|
+
"@getpara/web-sdk": "2.0.0-alpha.63",
|
|
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.
|
|
20
|
-
"@getpara/evm-wallet-connectors": "2.0.0-alpha.
|
|
21
|
-
"@getpara/solana-wallet-connectors": "2.0.0-alpha.
|
|
19
|
+
"@getpara/cosmos-wallet-connectors": "2.0.0-alpha.63",
|
|
20
|
+
"@getpara/evm-wallet-connectors": "2.0.0-alpha.63",
|
|
21
|
+
"@getpara/solana-wallet-connectors": "2.0.0-alpha.63",
|
|
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": "
|
|
41
|
+
"gitHead": "440300efa66a6bc808504e2771b21e92bdee4c9b",
|
|
42
42
|
"main": "dist/index.js",
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@tanstack/react-query": ">=5.0.0",
|