@gearbox-protocol/sdk 1.15.14 → 1.15.16
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.
|
@@ -130,7 +130,7 @@ var CreditAccountWatcher = /** @class */ (function () {
|
|
|
130
130
|
CreditAccountWatcher.batchCreditAccountLoad = function (accs, dataCompressor, signer, options) {
|
|
131
131
|
var _a;
|
|
132
132
|
return __awaiter(this, void 0, void 0, function () {
|
|
133
|
-
var chunkSize, atBlock, dcmc, calls, i, chunk, data;
|
|
133
|
+
var chunkSize, atBlock, dcmc, calls, i, chunk, data, _i, calls_1, c, result;
|
|
134
134
|
return __generator(this, function (_b) {
|
|
135
135
|
switch (_b.label) {
|
|
136
136
|
case 0:
|
|
@@ -153,10 +153,21 @@ var CreditAccountWatcher = /** @class */ (function () {
|
|
|
153
153
|
};
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
|
-
|
|
156
|
+
data = [];
|
|
157
|
+
_i = 0, calls_1 = calls;
|
|
158
|
+
_b.label = 1;
|
|
157
159
|
case 1:
|
|
158
|
-
|
|
159
|
-
|
|
160
|
+
if (!(_i < calls_1.length)) return [3 /*break*/, 4];
|
|
161
|
+
c = calls_1[_i];
|
|
162
|
+
return [4 /*yield*/, dcmc.call(c, { blockTag: atBlock, gasLimit: 300e6 })];
|
|
163
|
+
case 2:
|
|
164
|
+
result = _b.sent();
|
|
165
|
+
data.push(result);
|
|
166
|
+
_b.label = 3;
|
|
167
|
+
case 3:
|
|
168
|
+
_i++;
|
|
169
|
+
return [3 /*break*/, 1];
|
|
170
|
+
case 4: return [2 /*return*/, data.flat().map(function (c) { return new creditAccount_1.CreditAccountData(c); })];
|
|
160
171
|
}
|
|
161
172
|
});
|
|
162
173
|
});
|