@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.
@@ -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 (!(chainId && currentChainId != chainId)) return [3 /*break*/, 6];
149
- if (!(!config || !config.isSecond)) return [3 /*break*/, 6];
150
- return [4 /*yield*/, provider.disconnect()];
151
- case 3:
152
- _a.sent();
153
- return [4 /*yield*/, new Promise(function (r) {
154
- setTimeout(r, 500);
155
- })];
156
- case 4:
157
- _a.sent();
158
- return [4 /*yield*/, this.requestConnect(chainId, __assign({ isSecond: true }, config))];
159
- case 5: return [2 /*return*/, _a.sent()];
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 7:
164
+ case 3:
166
165
  address = (_a.sent())[0];
167
166
  this.address = address;
168
167
  this.chainId = currentChainId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openocean.finance/wallet",
3
- "version": "0.4.21",
3
+ "version": "0.4.22",
4
4
  "description": "A multi-chain wallets manager",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {