@openocean.finance/wallet 0.4.21 → 0.4.22
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/lib/Wallets/WalletConnect.js +13 -14
- package/package.json +1 -1
|
@@ -145,24 +145,23 @@ var WalletConnect = /** @class */ (function (_super) {
|
|
|
145
145
|
return [4 /*yield*/, this.sdk.eth.getChainId()];
|
|
146
146
|
case 2:
|
|
147
147
|
currentChainId = _a.sent();
|
|
148
|
-
if (
|
|
149
|
-
if (!
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
case 6:
|
|
148
|
+
// if (chainId && currentChainId != chainId) {
|
|
149
|
+
// if (!config || !config.isSecond) {
|
|
150
|
+
// await provider.disconnect()
|
|
151
|
+
// await new Promise(r => {
|
|
152
|
+
// setTimeout(r, 500);
|
|
153
|
+
// })
|
|
154
|
+
// return await this.requestConnect(chainId, {
|
|
155
|
+
// isSecond: true,
|
|
156
|
+
// ...config
|
|
157
|
+
// })
|
|
158
|
+
// }
|
|
159
|
+
// }
|
|
161
160
|
if (chainId && currentChainId != chainId) {
|
|
162
161
|
throw new Error(types_1.EnumErrors.ChainIdNotMath);
|
|
163
162
|
}
|
|
164
163
|
return [4 /*yield*/, this.sdk.eth.getAccounts()];
|
|
165
|
-
case
|
|
164
|
+
case 3:
|
|
166
165
|
address = (_a.sent())[0];
|
|
167
166
|
this.address = address;
|
|
168
167
|
this.chainId = currentChainId;
|