@getpara/react-core 3.11.0 → 3.12.0-dev.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.
|
@@ -22,6 +22,7 @@ import { useQuery } from "@tanstack/react-query";
|
|
|
22
22
|
import { useClient } from "../utils/useClient.js";
|
|
23
23
|
import { useCoreStore } from "../../stores/CoreStoreContext.js";
|
|
24
24
|
const IS_FULLY_LOGGED_IN_BASE_KEY = "PARA_FULLY_LOGGED_IN";
|
|
25
|
+
const FULL_LOGIN_RETRY_DELAY_MS = 1100;
|
|
25
26
|
const useIsFullyLoggedIn = () => {
|
|
26
27
|
var _a;
|
|
27
28
|
const client = useClient();
|
|
@@ -38,8 +39,11 @@ const useIsFullyLoggedIn = () => {
|
|
|
38
39
|
enabled: isReady && !!client,
|
|
39
40
|
queryKey: [IS_FULLY_LOGGED_IN_BASE_KEY, phaseKey, (_a = client == null ? void 0 : client.userId) != null ? _a : null],
|
|
40
41
|
queryFn: () => __async(null, null, function* () {
|
|
41
|
-
var _a2;
|
|
42
|
-
|
|
42
|
+
var _a2, _b;
|
|
43
|
+
const isFullyLoggedIn = (_a2 = yield client == null ? void 0 : client.isFullyLoggedIn()) != null ? _a2 : false;
|
|
44
|
+
if (isFullyLoggedIn || phaseKey !== "authenticated") return isFullyLoggedIn;
|
|
45
|
+
yield new Promise((resolve) => setTimeout(resolve, FULL_LOGIN_RETRY_DELAY_MS));
|
|
46
|
+
return (_b = yield client == null ? void 0 : client.isFullyLoggedIn()) != null ? _b : false;
|
|
43
47
|
})
|
|
44
48
|
});
|
|
45
49
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/react-core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.12.0-dev.0",
|
|
4
4
|
"description": "Platform-agnostic ParaProvider, hooks, and store for Para SDK",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -89,18 +89,18 @@
|
|
|
89
89
|
"test": "vitest run"
|
|
90
90
|
},
|
|
91
91
|
"dependencies": {
|
|
92
|
-
"@getpara/core-sdk": "3.
|
|
92
|
+
"@getpara/core-sdk": "3.10.0",
|
|
93
93
|
"zustand": "^5.0.0"
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
|
96
96
|
"@cosmjs/amino": "^0.32.0",
|
|
97
97
|
"@cosmjs/proto-signing": "^0.32.0",
|
|
98
|
-
"@getpara/cosmjs-v0-integration": "3.
|
|
99
|
-
"@getpara/ethers-v6-integration": "3.
|
|
100
|
-
"@getpara/solana-signers-v2-integration": "3.
|
|
101
|
-
"@getpara/stellar-sdk-v14-integration": "3.
|
|
102
|
-
"@getpara/sui-sdk-integration": "3.
|
|
103
|
-
"@getpara/viem-v2-integration": "3.
|
|
98
|
+
"@getpara/cosmjs-v0-integration": "3.10.0",
|
|
99
|
+
"@getpara/ethers-v6-integration": "3.10.0",
|
|
100
|
+
"@getpara/solana-signers-v2-integration": "3.10.0",
|
|
101
|
+
"@getpara/stellar-sdk-v14-integration": "3.10.0",
|
|
102
|
+
"@getpara/sui-sdk-integration": "3.10.0",
|
|
103
|
+
"@getpara/viem-v2-integration": "3.10.0",
|
|
104
104
|
"@solana/signers": "^2.0.0",
|
|
105
105
|
"@tanstack/react-query": "^5.74.0",
|
|
106
106
|
"@testing-library/dom": "^10.4.0",
|
|
@@ -145,6 +145,5 @@
|
|
|
145
145
|
"@getpara/viem-v2-integration": {
|
|
146
146
|
"optional": true
|
|
147
147
|
}
|
|
148
|
-
}
|
|
149
|
-
"gitHead": "5615f9e4661a004ae1f0b90410877901df01880e"
|
|
148
|
+
}
|
|
150
149
|
}
|