@openocean.finance/openocean-sdk 1.2.94 → 1.2.96

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.
@@ -100,22 +100,25 @@ var SwapSdk = /** @class */ (function () {
100
100
  }
101
101
  _a.label = 2;
102
102
  case 2:
103
- _a.trys.push([2, 4, , 5]);
104
- return [4 /*yield*/, this.wallet.sdk.eth.getGasPrice()];
103
+ if (!(this.wallet.sdk && this.wallet.sdk.eth && this.wallet.sdk.eth.getGasPrice)) return [3 /*break*/, 6];
104
+ _a.label = 3;
105
105
  case 3:
106
- _gasPrice = _a.sent();
107
- return [3 /*break*/, 5];
106
+ _a.trys.push([3, 5, , 6]);
107
+ return [4 /*yield*/, this.wallet.sdk.eth.getGasPrice()];
108
108
  case 4:
109
- e_1 = _a.sent();
110
- console.log('this.wallet.sdk.eth.getGasPrice', e_1);
111
- return [3 /*break*/, 5];
109
+ _gasPrice = _a.sent();
110
+ return [3 /*break*/, 6];
112
111
  case 5:
112
+ e_1 = _a.sent();
113
+ return [3 /*break*/, 6];
114
+ case 6:
113
115
  if (_gasPrice && swapData.gasPrice) {
114
116
  swapData.gasPrice = (0, bignumber_js_1.default)(_gasPrice).comparedTo(swapData.gasPrice) > 0 ? swapData.gasPrice : _gasPrice;
115
117
  }
116
118
  else if (_gasPrice && !swapData.gasPrice) {
117
119
  swapData.gasPrice = _gasPrice;
118
120
  }
121
+ console.log('this.wallet.sdk.eth.getGasPrice', swapData.gasPrice);
119
122
  this.swap(swapData)
120
123
  .on('transactionHash', resolve)
121
124
  .on('error', reject);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openocean.finance/openocean-sdk",
3
- "version": "1.2.94",
3
+ "version": "1.2.96",
4
4
  "description": "Openocean sdk",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -48,7 +48,7 @@
48
48
  "dependencies": {
49
49
  "@ethersproject/bignumber": "^5.1.1",
50
50
  "@looksrare/sdk": "^0.12.1",
51
- "@openocean.finance/wallet": "^1.5.53",
51
+ "@openocean.finance/wallet": "^1.5.57",
52
52
  "@solana/web3.js": "1.31.0",
53
53
  "@uniswap/v2-core": "^1.0.1",
54
54
  "@walletconnect/web3-provider": "^1.7.8",