@openocean.finance/openocean-sdk 1.2.86 → 1.2.87

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.
@@ -559,18 +559,18 @@ var Swap = /** @class */ (function () {
559
559
  };
560
560
  Swap.prototype.getGasOld = function () {
561
561
  return __awaiter(this, void 0, void 0, function () {
562
- var _a, inToken, inAmount, data, to, gas;
562
+ var _a, inToken, inAmount, data, to, value, gas;
563
563
  return __generator(this, function (_b) {
564
564
  switch (_b.label) {
565
565
  case 0:
566
- _a = this.res, inToken = _a.inToken, inAmount = _a.inAmount, data = _a.data, to = _a.to;
566
+ _a = this.res, inToken = _a.inToken, inAmount = _a.inAmount, data = _a.data, to = _a.to, value = _a.value;
567
567
  return [4 /*yield*/, this.wallet.sdk.eth.estimateGas({
568
568
  from: this.wallet.address,
569
569
  to: to,
570
570
  data: data,
571
571
  value: wallet_1.chainsObj.isNativeToken(this.chain.key, inToken.address)
572
572
  ? inAmount
573
- : 0,
573
+ : value || 0,
574
574
  })];
575
575
  case 1:
576
576
  gas = _b.sent();
@@ -683,7 +683,7 @@ var Swap = /** @class */ (function () {
683
683
  switch (_b.label) {
684
684
  case 0:
685
685
  _a = this.res, inToken = _a.inToken, inAmount = _a.inAmount, data = _a.data, to = _a.to, ethGasPrice = _a.ethGasPrice, gasPrice = _a.gasPrice, estimatedGas = _a.estimatedGas, value = _a.value;
686
- console.log('sendEthTransaction');
686
+ console.log('sendEthTransaction res', JSON.stringify(this.res));
687
687
  swapParams = {
688
688
  from: this.wallet.address,
689
689
  to: to,
@@ -705,6 +705,7 @@ var Swap = /** @class */ (function () {
705
705
  else if (value) {
706
706
  swapParams.value = value;
707
707
  }
708
+ console.log('sendEthTransaction swapParams', JSON.stringify(swapParams));
708
709
  if (!(this.wallet.key === "GnosisSafeWallet")) return [3 /*break*/, 5];
709
710
  _b.label = 1;
710
711
  case 1:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openocean.finance/openocean-sdk",
3
- "version": "1.2.86",
3
+ "version": "1.2.87",
4
4
  "description": "Openocean sdk",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {