@curvefi/api 2.49.3 → 2.49.4

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/curve.js CHANGED
@@ -54,7 +54,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
54
54
  }
55
55
  return to.concat(ar || Array.prototype.slice.call(from));
56
56
  };
57
- import { ethers, Contract, JsonRpcSigner } from "ethers";
57
+ import { ethers, Contract, AbstractProvider } from "ethers";
58
58
  import { Provider as MulticallProvider, Contract as MulticallContract } from 'ethcall';
59
59
  import { getFactoryPoolData } from "./factory/factory.js";
60
60
  import { getFactoryPoolsDataFromApi } from "./factory/factory-api.js";
@@ -940,11 +940,11 @@ var Curve = /** @class */ (function () {
940
940
  curveInstance_1 = this;
941
941
  curveInstance_1.setContract(curveInstance_1.constants.ALIASES.gas_oracle, gasOracleABI);
942
942
  // @ts-ignore
943
- if (JsonRpcSigner.prototype.originalEstimate) {
943
+ if (AbstractProvider.prototype.originalEstimate) {
944
944
  // @ts-ignore
945
- JsonRpcSigner.prototype.estimateGas = JsonRpcSigner.prototype.originalEstimate;
945
+ AbstractProvider.prototype.estimateGas = AbstractProvider.prototype.originalEstimate;
946
946
  }
947
- originalEstimate_1 = JsonRpcSigner.prototype.estimateGas;
947
+ originalEstimate_1 = AbstractProvider.prototype.estimateGas;
948
948
  oldEstimate = function (arg) {
949
949
  return __awaiter(this, void 0, void 0, function () {
950
950
  var originalEstimateFunc, gas;
@@ -979,15 +979,15 @@ var Curve = /** @class */ (function () {
979
979
  });
980
980
  };
981
981
  // @ts-ignore
982
- JsonRpcSigner.prototype.estimateGas = newEstimate;
982
+ AbstractProvider.prototype.estimateGas = newEstimate;
983
983
  // @ts-ignore
984
- JsonRpcSigner.prototype.originalEstimate = oldEstimate;
984
+ AbstractProvider.prototype.originalEstimate = oldEstimate;
985
985
  }
986
986
  else {
987
987
  // @ts-ignore
988
- if (JsonRpcSigner.prototype.originalEstimate) {
988
+ if (AbstractProvider.prototype.originalEstimate) {
989
989
  // @ts-ignore
990
- JsonRpcSigner.prototype.estimateGas = JsonRpcSigner.prototype.originalEstimate;
990
+ AbstractProvider.prototype.estimateGas = AbstractProvider.prototype.originalEstimate;
991
991
  }
992
992
  }
993
993
  return [2 /*return*/];
package/lib/utils.js CHANGED
@@ -120,7 +120,7 @@ export var DIGas = function (gas) {
120
120
  }
121
121
  };
122
122
  export var getGasFromArray = function (gas) {
123
- if (gas.length === 1) {
123
+ if (gas[1] === 0) {
124
124
  return gas[0];
125
125
  }
126
126
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curvefi/api",
3
- "version": "2.49.3",
3
+ "version": "2.49.4",
4
4
  "description": "JavaScript library for curve.fi",
5
5
  "main": "lib/index.js",
6
6
  "author": "Macket",