Skip to content

chore(deps): Remove axios, use SDK FetchUtils#3142

Open
nicholaspai wants to merge 9 commits intomasterfrom
remove-axios-dep
Open

chore(deps): Remove axios, use SDK FetchUtils#3142
nicholaspai wants to merge 9 commits intomasterfrom
remove-axios-dep

Conversation

@nicholaspai
Copy link
Copy Markdown
Member

Summary

  • Remove direct axios dependency from package.json
  • Replace all axios.get/axios.post calls across 10 files with fetchWithTimeout/postWithTimeout from @across-protocol/sdk utils (native fetch-based)
  • Export fetchWithTimeout, postWithTimeout, FetchHeaders, and FetchQueryParams from SDKUtils.ts
  • Replace axios.isAxiosError() checks with Error.message pattern matching (e.g., includes("HTTP 404"))
  • Replace RawAxiosRequestHeaders type with FetchHeaders from SDK
  • Net reduction of 52 lines

Files changed

File Migration
src/utils/SDKUtils.ts Export new SDK fetch utils
src/utils/OFTUtils.ts axios.getfetchWithTimeout
src/utils/CCTPUtils.ts axios.getfetchWithTimeout
src/utils/BridgeUtils.ts axios.get/postfetchWithTimeout/postWithTimeout, RawAxiosRequestHeadersFetchHeaders
src/clients/AcrossApiBaseClient.ts axios.getfetchWithTimeout, AxiosErrorError
src/clients/AcrossAPIClient.ts axios()fetchWithTimeout
src/refiller/Refiller.ts axios.get + 2× axios.post → SDK utils
src/finalizer/utils/scroll.ts axios.getfetchWithTimeout
src/finalizer/utils/helios.ts axios.get/post/isAxiosError → SDK utils
scripts/simulateFill.ts axios.post/isAxiosErrorpostWithTimeout
scripts/fetchInventoryConfig.ts axios.get/isAxiosErrorfetchWithTimeout

Test plan

  • yarn build compiles successfully
  • Verify relay operations against staging APIs
  • Verify finalizer flows (Scroll, Helios) work end-to-end
  • Verify Refiller native markets integration

🤖 Generated with Claude Code

Replace all axios.get/post calls with fetchWithTimeout/postWithTimeout
from @across-protocol/sdk utils. This removes a direct dependency and
standardizes HTTP requests on the native fetch-based SDK utilities.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
nicholaspai and others added 2 commits April 2, 2026 10:54
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@nicholaspai
Copy link
Copy Markdown
Member Author

@codex

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c1980945cc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

nicholaspai and others added 2 commits April 2, 2026 10:11
…dency

Import from ../utils/SDKUtils instead of the ../utils barrel in
AcrossApiBaseClient to prevent a circular dependency chain through
the clients index.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@nicholaspai
Copy link
Copy Markdown
Member Author

@codex

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@nicholaspai
Copy link
Copy Markdown
Member Author

@codex

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant