@getpara/solana-wallet-connectors 1.18.0 → 1.18.1
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.
|
@@ -120,7 +120,7 @@ function SolanaExternalWalletProvider({ children, para, onSwitchWallet }) {
|
|
|
120
120
|
signature: bs58.encode(signature)
|
|
121
121
|
};
|
|
122
122
|
} catch (e) {
|
|
123
|
-
if (e.message.includes("User rejected the request")) {
|
|
123
|
+
if (e.message.includes("User rejected the request") || e.message.includes("Plugin Closed") || e.message.includes("Approval Denied")) {
|
|
124
124
|
return { error: "Signature request rejected" };
|
|
125
125
|
}
|
|
126
126
|
return { error: "An unknown error occurred" };
|
|
@@ -143,7 +143,28 @@ function SolanaExternalWalletProvider({ children, para, onSwitchWallet }) {
|
|
|
143
143
|
let isVerified = false;
|
|
144
144
|
try {
|
|
145
145
|
yield adapter.connect();
|
|
146
|
-
|
|
146
|
+
if (adapter.publicKey) {
|
|
147
|
+
address = adapter.publicKey.toString();
|
|
148
|
+
} else {
|
|
149
|
+
yield new Promise((resolve, reject) => {
|
|
150
|
+
adapter.once("connect", () => __async(this, null, function* () {
|
|
151
|
+
try {
|
|
152
|
+
address = adapter.publicKey.toString();
|
|
153
|
+
resolve();
|
|
154
|
+
} catch (err) {
|
|
155
|
+
reject(err);
|
|
156
|
+
}
|
|
157
|
+
}));
|
|
158
|
+
adapter.once("error", (err) => {
|
|
159
|
+
error = (err == null ? void 0 : err.message) || "An unknown error occurred";
|
|
160
|
+
reject(err);
|
|
161
|
+
});
|
|
162
|
+
adapter.once("disconnect", () => {
|
|
163
|
+
error = "Disconnected before connect event";
|
|
164
|
+
reject(new Error(error));
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
}
|
|
147
168
|
if (address) {
|
|
148
169
|
try {
|
|
149
170
|
const loginResp = yield login(address, adapter.name);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/solana-wallet-connectors",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"./connectors": "./dist/wallets/connectors/index.js"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@getpara/react-sdk": "1.18.
|
|
12
|
+
"@getpara/react-sdk": "1.18.1",
|
|
13
13
|
"bs58": "6.0.0"
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"dist",
|
|
39
39
|
"package.json"
|
|
40
40
|
],
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "557c66d9085b97952c1ddc207f26c50eaa9af2f8"
|
|
42
42
|
}
|