@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 +8 -8
- package/lib/utils.js +1 -1
- package/package.json +1 -1
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,
|
|
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 (
|
|
943
|
+
if (AbstractProvider.prototype.originalEstimate) {
|
|
944
944
|
// @ts-ignore
|
|
945
|
-
|
|
945
|
+
AbstractProvider.prototype.estimateGas = AbstractProvider.prototype.originalEstimate;
|
|
946
946
|
}
|
|
947
|
-
originalEstimate_1 =
|
|
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
|
-
|
|
982
|
+
AbstractProvider.prototype.estimateGas = newEstimate;
|
|
983
983
|
// @ts-ignore
|
|
984
|
-
|
|
984
|
+
AbstractProvider.prototype.originalEstimate = oldEstimate;
|
|
985
985
|
}
|
|
986
986
|
else {
|
|
987
987
|
// @ts-ignore
|
|
988
|
-
if (
|
|
988
|
+
if (AbstractProvider.prototype.originalEstimate) {
|
|
989
989
|
// @ts-ignore
|
|
990
|
-
|
|
990
|
+
AbstractProvider.prototype.estimateGas = AbstractProvider.prototype.originalEstimate;
|
|
991
991
|
}
|
|
992
992
|
}
|
|
993
993
|
return [2 /*return*/];
|
package/lib/utils.js
CHANGED