@getpara/react-sdk 1.18.0-dev.1 → 1.18.0
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/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "../../../chunk-MMUBH76A.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { CpslButton, CpslSpinner, CpslText } from "@getpara/react-components";
|
|
7
|
-
import { useEffect,
|
|
7
|
+
import { useEffect, useState } from "react";
|
|
8
8
|
import { styled } from "styled-components";
|
|
9
9
|
import { ModalStep } from "../../utils/steps.js";
|
|
10
10
|
import { useModalStore, useThemeStore, useUserInfoStore } from "../../stores/index.js";
|
|
@@ -13,7 +13,6 @@ import { AuthMethod } from "@getpara/core-sdk";
|
|
|
13
13
|
import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
|
|
14
14
|
import { useExternalWallets } from "../../providers/ExternalWalletContext.js";
|
|
15
15
|
const ExternalWalletVerificationStep = () => {
|
|
16
|
-
const effectRan = useRef(false);
|
|
17
16
|
const theme = useThemeStore((state) => state.theme);
|
|
18
17
|
const authInfo = useUserInfoStore((state) => state.getAuthInfo());
|
|
19
18
|
const setStep = useModalStore((state) => state.setStep);
|
|
@@ -28,11 +27,7 @@ const ExternalWalletVerificationStep = () => {
|
|
|
28
27
|
const [shouldRouteToStep, setShouldRouteToStep] = useState();
|
|
29
28
|
const [isVerifying, setIsVerifying] = useState(false);
|
|
30
29
|
useEffect(() => {
|
|
31
|
-
|
|
32
|
-
if (!hasRun) {
|
|
33
|
-
verifyWalletSignature();
|
|
34
|
-
effectRan.current = true;
|
|
35
|
-
}
|
|
30
|
+
handleVerifyWallet();
|
|
36
31
|
}, []);
|
|
37
32
|
useEffect(() => {
|
|
38
33
|
if (!!shouldRouteToStep && isIFrameReady) {
|
|
@@ -89,7 +84,7 @@ const ExternalWalletVerificationStep = () => {
|
|
|
89
84
|
/* @__PURE__ */ jsx(CpslText, { weight: "semiBold", color: "error", children: externalWalletError == null ? void 0 : externalWalletError[0] })
|
|
90
85
|
] })
|
|
91
86
|
] }),
|
|
92
|
-
/* @__PURE__ */ jsx(InnerStepContainer, { children: isVerifying
|
|
87
|
+
/* @__PURE__ */ jsx(InnerStepContainer, { children: isVerifying ? /* @__PURE__ */ jsx(CpslSpinner, {}) : /* @__PURE__ */ jsx(CpslButton, { onClick: handleVerifyWallet, children: "Retry" }) })
|
|
93
88
|
] });
|
|
94
89
|
};
|
|
95
90
|
const InlineText = styled(CpslText)`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/react-sdk",
|
|
3
|
-
"version": "1.18.0
|
|
3
|
+
"version": "1.18.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"resolutions": {
|
|
52
52
|
"styled-components": "^6"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "5928feb89e9fe821893477e4f892f6efa2ebffe2"
|
|
55
55
|
}
|