@defillama/sdk 2.3.29 → 2.3.30
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/build/util/index.js +4 -3
- package/package.json +1 -1
package/build/util/index.js
CHANGED
|
@@ -70,8 +70,9 @@ var kavaBlockProvider = {
|
|
|
70
70
|
};
|
|
71
71
|
var terraBlockProvider = {
|
|
72
72
|
getBlock: function (height) { return __awaiter(void 0, void 0, void 0, function () {
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
var _a;
|
|
74
|
+
return __generator(this, function (_b) {
|
|
75
|
+
return [2 /*return*/, node_fetch_1.default(((_a = process.env["TERRA_RPC"]) !== null && _a !== void 0 ? _a : "https://lcd.terra.dev") + "/blocks/" + height)
|
|
75
76
|
.then(function (res) { return res.json(); })
|
|
76
77
|
.then(function (block) { return ({
|
|
77
78
|
number: Number(block.block.header.height),
|
|
@@ -139,7 +140,7 @@ function lookupBlock(timestamp, extraParams) {
|
|
|
139
140
|
}];
|
|
140
141
|
}
|
|
141
142
|
high = lastBlock.number;
|
|
142
|
-
low = 0;
|
|
143
|
+
low = (extraParams === null || extraParams === void 0 ? void 0 : extraParams.chain) === "terra" ? 4724001 : 0;
|
|
143
144
|
block = void 0;
|
|
144
145
|
_d.label = 2;
|
|
145
146
|
case 2:
|