@getpara/react-sdk-lite 2.0.0-alpha.69 → 2.0.0-alpha.70
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 +1 -1
- package/dist/modal/components/AwaitingAccountStep/AwaitingAccountStep.js +3 -2
- package/dist/provider/actions/getEmbeddedAccount.js +1 -1
- package/dist/provider/hooks/utils/useAutoSessionKeepAlive.js +1 -1
- package/dist/provider/hooks/utils/useEventListeners.js +2 -1
- package/dist/provider/providers/AccountLinkProvider.js +1 -1
- package/dist/provider/providers/AuthProvider.js +3 -1
- package/dist/provider/providers/ExternalWalletProvider.js +2 -2
- package/package.json +8 -8
package/dist/modal/ParaModal.js
CHANGED
|
@@ -4,9 +4,10 @@ import { jsx } from "react/jsx-runtime";
|
|
|
4
4
|
import { useModalStore } from "../../stores/index.js";
|
|
5
5
|
import { Waiting } from "../Waiting/Waiting.js";
|
|
6
6
|
const AwaitingAccountStep = () => {
|
|
7
|
+
var _a;
|
|
7
8
|
const isLogin = useModalStore((state) => state.isLogin());
|
|
8
|
-
const
|
|
9
|
-
const isSLOPopup =
|
|
9
|
+
const refs = useModalStore((state) => state.refs);
|
|
10
|
+
const isSLOPopup = ((_a = refs.popupWindow.current) == null ? void 0 : _a.closed) === false;
|
|
10
11
|
return /* @__PURE__ */ jsx(
|
|
11
12
|
Waiting,
|
|
12
13
|
{
|
|
@@ -25,7 +25,7 @@ const getEmbeddedAccount = (para, isFullyLoggedIn) => __async(void 0, null, func
|
|
|
25
25
|
let authMethods;
|
|
26
26
|
try {
|
|
27
27
|
authMethods = yield para.supportedUserAuthMethods();
|
|
28
|
-
} catch (
|
|
28
|
+
} catch (e) {
|
|
29
29
|
authMethods = /* @__PURE__ */ new Set();
|
|
30
30
|
}
|
|
31
31
|
const value = {
|
|
@@ -31,7 +31,7 @@ const useAutoSessionKeepAlive = ({ disabled }) => {
|
|
|
31
31
|
if (!sessionCookie) return null;
|
|
32
32
|
const expiresMatch = sessionCookie.match(/Expires=([^;]+)/);
|
|
33
33
|
return expiresMatch ? new Date(expiresMatch[1]) : null;
|
|
34
|
-
} catch (
|
|
34
|
+
} catch (e) {
|
|
35
35
|
return null;
|
|
36
36
|
}
|
|
37
37
|
});
|
|
@@ -50,9 +50,10 @@ const useEventListeners = ({
|
|
|
50
50
|
);
|
|
51
51
|
const accountCreationListener = useCallback(
|
|
52
52
|
(event) => {
|
|
53
|
+
loginOrSetupListener();
|
|
53
54
|
onAccountCreation == null ? void 0 : onAccountCreation(event);
|
|
54
55
|
},
|
|
55
|
-
[onAccountCreation]
|
|
56
|
+
[loginOrSetupListener, onAccountCreation]
|
|
56
57
|
);
|
|
57
58
|
const logoutListener = useCallback(
|
|
58
59
|
(event) => {
|
|
@@ -189,7 +189,9 @@ function AuthProvider({
|
|
|
189
189
|
onSuccess: () => {
|
|
190
190
|
if (para.isNoWalletConfig) {
|
|
191
191
|
onLoginComplete({
|
|
192
|
-
on2faSetupOrError: () =>
|
|
192
|
+
on2faSetupOrError: () => {
|
|
193
|
+
setStep(ModalStep.LOGIN_DONE);
|
|
194
|
+
},
|
|
193
195
|
on2faNotSetup: () => setStep(ModalStep.SETUP_2FA)
|
|
194
196
|
});
|
|
195
197
|
} else {
|
|
@@ -478,11 +478,11 @@ function ExternalWalletProvider({ children }) {
|
|
|
478
478
|
} else {
|
|
479
479
|
throw new Error("Unknown error linking external wallet");
|
|
480
480
|
}
|
|
481
|
-
} catch (
|
|
481
|
+
} catch (e) {
|
|
482
482
|
}
|
|
483
483
|
yield connectEmbeddedToExternalConnectors();
|
|
484
484
|
setStep(ModalStep.ACCOUNT_PROFILE);
|
|
485
|
-
} catch (
|
|
485
|
+
} catch (e) {
|
|
486
486
|
setExternalWalletError(["Failed to add wallet. Please try again."]);
|
|
487
487
|
}
|
|
488
488
|
}),
|
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.70",
|
|
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.70",
|
|
9
|
+
"@getpara/react-components": "2.0.0-alpha.70",
|
|
10
|
+
"@getpara/web-sdk": "2.0.0-alpha.70",
|
|
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.70",
|
|
20
|
+
"@getpara/evm-wallet-connectors": "2.0.0-alpha.70",
|
|
21
|
+
"@getpara/solana-wallet-connectors": "2.0.0-alpha.70",
|
|
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": "99d44cff3c68c07dc1cd8c2709b6ca4cd57dca61",
|
|
42
42
|
"main": "dist/index.js",
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@tanstack/react-query": ">=5.0.0",
|