@getpara/evm-wallet-connectors 3.0.0-alpha.0 → 3.0.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.
|
@@ -76,10 +76,13 @@ function EvmExternalWalletProvider({
|
|
|
76
76
|
yield disconnect(config);
|
|
77
77
|
}),
|
|
78
78
|
getAddress: () => __async(this, null, function* () {
|
|
79
|
-
var _a, _b;
|
|
79
|
+
var _a, _b, _c;
|
|
80
80
|
const connections2 = getConnections(config);
|
|
81
|
-
const nonParaConnection = connections2.find((c) =>
|
|
82
|
-
|
|
81
|
+
const nonParaConnection = (_a = connections2.find((c) => {
|
|
82
|
+
var _a2;
|
|
83
|
+
return c.connector.name !== "Para" && !!((_a2 = c.accounts) == null ? void 0 : _a2[0]);
|
|
84
|
+
})) != null ? _a : connections2.find((c) => c.connector.name !== "Para");
|
|
85
|
+
const address = (_c = (_b = nonParaConnection == null ? void 0 : nonParaConnection.accounts) == null ? void 0 : _b[0]) != null ? _c : null;
|
|
83
86
|
return address;
|
|
84
87
|
}),
|
|
85
88
|
signMessage: (_0) => __async(this, [_0], function* ({ message, address }) {
|
|
@@ -103,10 +106,13 @@ function EvmExternalWalletProvider({
|
|
|
103
106
|
watchWalletChange: (callback) => {
|
|
104
107
|
return watchAccount(config, {
|
|
105
108
|
onChange: (account) => {
|
|
106
|
-
var _a, _b;
|
|
109
|
+
var _a, _b, _c;
|
|
107
110
|
const connections2 = getConnections(config);
|
|
108
|
-
const nonParaConnection = connections2.find((c) =>
|
|
109
|
-
|
|
111
|
+
const nonParaConnection = (_a = connections2.find((c) => {
|
|
112
|
+
var _a2;
|
|
113
|
+
return c.connector.name !== "Para" && !!((_a2 = c.accounts) == null ? void 0 : _a2[0]);
|
|
114
|
+
})) != null ? _a : connections2.find((c) => c.connector.name !== "Para");
|
|
115
|
+
const address = (_c = (_b = nonParaConnection == null ? void 0 : nonParaConnection.accounts) == null ? void 0 : _b[0]) != null ? _c : null;
|
|
110
116
|
const connector = nonParaConnection == null ? void 0 : nonParaConnection.connector;
|
|
111
117
|
if (account.isConnected && account.address === address) {
|
|
112
118
|
callback({
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/evm-wallet-connectors",
|
|
3
|
-
"version": "3.0.0
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@coinbase/wallet-sdk": "4.3.0",
|
|
6
|
-
"@getpara/wagmi-v2-connector": "3.0.0
|
|
7
|
-
"@getpara/web-sdk": "3.0.0
|
|
6
|
+
"@getpara/wagmi-v2-connector": "3.0.0",
|
|
7
|
+
"@getpara/web-sdk": "3.0.0",
|
|
8
8
|
"@walletconnect/ethereum-provider": "2.23.0",
|
|
9
9
|
"zustand": "^4.5.2",
|
|
10
10
|
"zustand-sync-tabs": "^0.2.2"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@getpara/react-common": "3.0.0
|
|
13
|
+
"@getpara/react-common": "3.0.0",
|
|
14
14
|
"@tanstack/react-query": "^5.74.0",
|
|
15
15
|
"@types/react": "^18.3.3",
|
|
16
16
|
"@types/react-dom": "^18.3.0",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dist",
|
|
27
27
|
"package.json"
|
|
28
28
|
],
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "e6c42e42adfcfadb0114b1ac65ba5203e6274712",
|
|
30
30
|
"main": "dist/index.js",
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@farcaster/miniapp-wagmi-connector": "^1.0.0",
|