@openocean.finance/wallet 0.4.23 → 0.4.24

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.
@@ -84,7 +84,7 @@ var GnosisSafeWallet = /** @class */ (function (_super) {
84
84
  */
85
85
  GnosisSafeWallet.prototype.requestConnect = function (chainId) {
86
86
  return __awaiter(this, void 0, void 0, function () {
87
- var opts, sdk, safe, provider, address, currentChainId;
87
+ var opts, sdk, safe, provider, currentChainId;
88
88
  return __generator(this, function (_a) {
89
89
  switch (_a.label) {
90
90
  case 0:
@@ -98,18 +98,13 @@ var GnosisSafeWallet = /** @class */ (function (_super) {
98
98
  safe = _a.sent();
99
99
  provider = new safe_apps_provider_1.SafeAppProvider(safe, sdk);
100
100
  this.sdk = new web3_1.default(provider);
101
- return [4 /*yield*/, this.sdk.eth.requestAccounts()];
102
- case 2:
103
- address = (_a.sent())[0];
104
- return [4 /*yield*/, this.sdk.eth.getChainId()];
105
- case 3:
106
- currentChainId = _a.sent();
101
+ currentChainId = safe.chainId;
107
102
  if (chainId && currentChainId !== chainId) {
108
103
  throw new Error(types_1.EnumErrors.ChainIdNotMath);
109
104
  }
110
- this.address = address;
105
+ this.address = safe.safeAddress;
111
106
  this.chainId = currentChainId;
112
- return [2 /*return*/, address];
107
+ return [2 /*return*/, this.address];
113
108
  }
114
109
  });
115
110
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openocean.finance/wallet",
3
- "version": "0.4.23",
3
+ "version": "0.4.24",
4
4
  "description": "A multi-chain wallets manager",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {