@curvefi/api 2.54.0 → 2.54.1
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 +12 -3
- package/package.json +1 -1
package/lib/curve.js
CHANGED
|
@@ -1135,10 +1135,12 @@ var Curve = /** @class */ (function () {
|
|
|
1135
1135
|
};
|
|
1136
1136
|
Curve.prototype.updateFeeData = function () {
|
|
1137
1137
|
return __awaiter(this, void 0, void 0, function () {
|
|
1138
|
-
var feeData;
|
|
1138
|
+
var feeData, e_2;
|
|
1139
1139
|
return __generator(this, function (_a) {
|
|
1140
1140
|
switch (_a.label) {
|
|
1141
|
-
case 0:
|
|
1141
|
+
case 0:
|
|
1142
|
+
_a.trys.push([0, 2, , 3]);
|
|
1143
|
+
return [4 /*yield*/, this.provider.getFeeData()];
|
|
1142
1144
|
case 1:
|
|
1143
1145
|
feeData = _a.sent();
|
|
1144
1146
|
if (feeData.maxFeePerGas === null || feeData.maxPriorityFeePerGas === null) {
|
|
@@ -1157,7 +1159,14 @@ var Curve = /** @class */ (function () {
|
|
|
1157
1159
|
this.parseUnits(this.feeData.maxPriorityFeePerGas.toString(), "gwei") :
|
|
1158
1160
|
feeData.maxPriorityFeePerGas;
|
|
1159
1161
|
}
|
|
1160
|
-
return [
|
|
1162
|
+
return [3 /*break*/, 3];
|
|
1163
|
+
case 2:
|
|
1164
|
+
e_2 = _a.sent();
|
|
1165
|
+
this.options.gasPrice = this.parseUnits('0', "gwei");
|
|
1166
|
+
this.options.maxPriorityFeePerGas = this.parseUnits('0', "gwei");
|
|
1167
|
+
this.options.maxFeePerGas = this.parseUnits('0', "gwei");
|
|
1168
|
+
return [3 /*break*/, 3];
|
|
1169
|
+
case 3: return [2 /*return*/];
|
|
1161
1170
|
}
|
|
1162
1171
|
});
|
|
1163
1172
|
});
|