@getpara/evm-wallet-connectors 2.0.0-alpha.16 → 2.0.0-alpha.18
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.
|
@@ -35,6 +35,8 @@ export type EvmExternalWalletProviderConfig = {
|
|
|
35
35
|
}) => void;
|
|
36
36
|
para: ParaWeb;
|
|
37
37
|
walletsWithFullAuth: TExternalWallet[];
|
|
38
|
+
includeWalletVerification?: boolean;
|
|
39
|
+
connectionOnly?: boolean;
|
|
38
40
|
connectedWallet?: Omit<Wallet, 'signer'> | null;
|
|
39
41
|
};
|
|
40
|
-
export declare function EvmExternalWalletProvider({ children, onSwitchWallet, para, walletsWithFullAuth, connectedWallet, }: EvmExternalWalletProviderConfig & PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export declare function EvmExternalWalletProvider({ children, onSwitchWallet, para, walletsWithFullAuth, connectedWallet, includeWalletVerification, connectionOnly, }: EvmExternalWalletProviderConfig & PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
@@ -44,7 +44,9 @@ function EvmExternalWalletProvider({
|
|
|
44
44
|
onSwitchWallet,
|
|
45
45
|
para,
|
|
46
46
|
walletsWithFullAuth,
|
|
47
|
-
connectedWallet
|
|
47
|
+
connectedWallet,
|
|
48
|
+
includeWalletVerification,
|
|
49
|
+
connectionOnly
|
|
48
50
|
}) {
|
|
49
51
|
const { connectAsync, connectors: untypedConnectors } = useConnect();
|
|
50
52
|
const connections = useConnections();
|
|
@@ -194,7 +196,9 @@ function EvmExternalWalletProvider({
|
|
|
194
196
|
provider: connectorName,
|
|
195
197
|
withFullParaAuth: walletsWithFullAuth == null ? void 0 : walletsWithFullAuth.includes((_a = walletId == null ? void 0 : walletId.toUpperCase()) != null ? _a : ""),
|
|
196
198
|
ensName,
|
|
197
|
-
ensAvatar
|
|
199
|
+
ensAvatar,
|
|
200
|
+
isConnectionOnly: connectionOnly,
|
|
201
|
+
withVerification: includeWalletVerification
|
|
198
202
|
}
|
|
199
203
|
});
|
|
200
204
|
} catch (err) {
|
|
@@ -210,7 +214,7 @@ function EvmExternalWalletProvider({
|
|
|
210
214
|
if (!address) {
|
|
211
215
|
yield para.logout();
|
|
212
216
|
} else {
|
|
213
|
-
if (para.isExternalWalletAuth) {
|
|
217
|
+
if (para.isExternalWalletAuth || para.isExternalWalletWithVerification) {
|
|
214
218
|
yield reset();
|
|
215
219
|
} else {
|
|
216
220
|
try {
|
|
@@ -247,7 +251,11 @@ function EvmExternalWalletProvider({
|
|
|
247
251
|
address = (_d = data.accounts) == null ? void 0 : _d[0];
|
|
248
252
|
if (address) {
|
|
249
253
|
try {
|
|
250
|
-
authState = yield login({
|
|
254
|
+
authState = yield login({
|
|
255
|
+
address,
|
|
256
|
+
connectorName: connector.name,
|
|
257
|
+
walletId: connector.paraDetails.id
|
|
258
|
+
});
|
|
251
259
|
verificationMessage.current = authState.stage === "verify" ? authState.signatureVerificationMessage : void 0;
|
|
252
260
|
} catch (err) {
|
|
253
261
|
address = void 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/evm-wallet-connectors",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.18",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@coinbase/wallet-sdk": "4.3.0",
|
|
13
|
-
"@getpara/wagmi-v2-connector": "2.0.0-alpha.
|
|
14
|
-
"@getpara/web-sdk": "2.0.0-alpha.
|
|
13
|
+
"@getpara/wagmi-v2-connector": "2.0.0-alpha.18",
|
|
14
|
+
"@getpara/web-sdk": "2.0.0-alpha.18",
|
|
15
15
|
"viem": "^2.24.2",
|
|
16
16
|
"wagmi": "^2.14.16",
|
|
17
17
|
"zustand": "^4.5.2",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"test": "vitest run --coverage"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@getpara/react-common": "2.0.0-alpha.
|
|
26
|
+
"@getpara/react-common": "2.0.0-alpha.18",
|
|
27
27
|
"@tanstack/react-query": ">=5.0.0",
|
|
28
28
|
"@types/react": "^18.0.31",
|
|
29
29
|
"@types/react-dom": "^18.2.7",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"dist",
|
|
40
40
|
"package.json"
|
|
41
41
|
],
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "2333bc727fe61593821d448ee12facaee230c4b0"
|
|
43
43
|
}
|