@gearbox-protocol/sdk 10.7.0 → 10.7.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.
@@ -184,7 +184,15 @@ const retryCodes = /* @__PURE__ */ new Set([
184
184
  const defaultShouldRetry = ({
185
185
  error
186
186
  }) => {
187
- if (error instanceof import_viem.CallExecutionError && error.details === "header not found") {
187
+ const callExError = error instanceof import_viem.BaseError && error.walk(
188
+ (e) => e instanceof import_viem.CallExecutionError && e.details === "header not found"
189
+ );
190
+ if (callExError && [
191
+ "unknown block",
192
+ "header not found",
193
+ "resource unavailable",
194
+ "requested resource not available"
195
+ ].some((s) => callExError.details.toLowerCase().includes(s))) {
188
196
  return true;
189
197
  }
190
198
  if ("code" in error && typeof error.code === "number") {
@@ -172,7 +172,15 @@ const retryCodes = /* @__PURE__ */ new Set([
172
172
  const defaultShouldRetry = ({
173
173
  error
174
174
  }) => {
175
- if (error instanceof CallExecutionError && error.details === "header not found") {
175
+ const callExError = error instanceof BaseError && error.walk(
176
+ (e) => e instanceof CallExecutionError && e.details === "header not found"
177
+ );
178
+ if (callExError && [
179
+ "unknown block",
180
+ "header not found",
181
+ "resource unavailable",
182
+ "requested resource not available"
183
+ ].some((s) => callExError.details.toLowerCase().includes(s))) {
176
184
  return true;
177
185
  }
178
186
  if ("code" in error && typeof error.code === "number") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "10.7.0",
3
+ "version": "10.7.1",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.js",