@gearbox-protocol/sdk 6.0.0 → 6.0.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.
|
@@ -158,11 +158,10 @@ class RedstoneUpdater extends import_base.SDKConstruct {
|
|
|
158
158
|
uncached.push(dataFeedId);
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
const
|
|
162
|
-
dataServiceId,
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
);
|
|
161
|
+
const [fromRedstoneResp] = await Promise.allSettled([
|
|
162
|
+
this.#fetchPayloads(dataServiceId, new Set(uncached), uniqueSignersCount)
|
|
163
|
+
]);
|
|
164
|
+
const fromRedstone = fromRedstoneResp.status === "fulfilled" ? fromRedstoneResp.value : [];
|
|
166
165
|
if (this.#historicalTimestampMs) {
|
|
167
166
|
for (const resp of fromRedstone) {
|
|
168
167
|
const key = cacheKey(
|
|
@@ -177,6 +176,9 @@ class RedstoneUpdater extends import_base.SDKConstruct {
|
|
|
177
176
|
this.#logger?.debug(
|
|
178
177
|
`got ${fromRedstone.length} new redstone updates and ${fromCache.length} from cache`
|
|
179
178
|
);
|
|
179
|
+
if (fromRedstoneResp.status === "rejected") {
|
|
180
|
+
this.#logger?.error(fromRedstoneResp.reason);
|
|
181
|
+
}
|
|
180
182
|
return [...fromCache, ...fromRedstone];
|
|
181
183
|
}
|
|
182
184
|
/**
|
|
@@ -134,11 +134,10 @@ class RedstoneUpdater extends SDKConstruct {
|
|
|
134
134
|
uncached.push(dataFeedId);
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
const
|
|
138
|
-
dataServiceId,
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
);
|
|
137
|
+
const [fromRedstoneResp] = await Promise.allSettled([
|
|
138
|
+
this.#fetchPayloads(dataServiceId, new Set(uncached), uniqueSignersCount)
|
|
139
|
+
]);
|
|
140
|
+
const fromRedstone = fromRedstoneResp.status === "fulfilled" ? fromRedstoneResp.value : [];
|
|
142
141
|
if (this.#historicalTimestampMs) {
|
|
143
142
|
for (const resp of fromRedstone) {
|
|
144
143
|
const key = cacheKey(
|
|
@@ -153,6 +152,9 @@ class RedstoneUpdater extends SDKConstruct {
|
|
|
153
152
|
this.#logger?.debug(
|
|
154
153
|
`got ${fromRedstone.length} new redstone updates and ${fromCache.length} from cache`
|
|
155
154
|
);
|
|
155
|
+
if (fromRedstoneResp.status === "rejected") {
|
|
156
|
+
this.#logger?.error(fromRedstoneResp.reason);
|
|
157
|
+
}
|
|
156
158
|
return [...fromCache, ...fromRedstone];
|
|
157
159
|
}
|
|
158
160
|
/**
|