Skip to content

fix(ens): strip trailing slash from custom Arweave gateway when rewriting arweave.net avatar URLs - #5601

Merged
jxom merged 2 commits into
mainfrom
fix/ens-avatar-arweave-gateway-slash
Nov 19, 2026
Merged

jxom merged 2 commits into
mainfrom
fix/ens-avatar-arweave-gateway-slash

Conversation

@jxom

@jxom jxom commented Nov 19, 2026

Copy link
Copy Markdown
Member

Supersedes #5600 by @mortezashojaei and keeps their commit.

resolveAvatarUri normalizes custom gateways with getGateway, but the branch that rewrites https://arweave.net/... URLs used the raw gatewayUrls.arweave value. A gateway with a trailing slash, such as https://gw.example/, produced https://gw.example//<tx>. That branch now uses the normalized arweaveGateway, the same value the ar:// branch uses. The IPFS/IPNS branches already used the normalized ipfsGateway.

On top of the original commit, the trailing-slash test now extends the existing arweave replace default case with test.each, so both gateway forms share one inline snapshot.

Checks:

  • pnpm test --run src/utils/ens/avatar/utils.test.ts -t "resolveAvatarUri|getGateway": passes. The trailing-slash case fails on main with https://example.com//rgW4….
  • Biome on the touched files: clean.
  • tsc -b src/tsconfig.json: clean.

@changeset-bot

changeset-bot Bot commented Nov 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e622347

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
viem Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
viem Error Error Nov 19, 2026 1:36am UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T01:34:10.324803Z e622347 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

Published [email protected] under the pr-5601 dist-tag, which follows this pull request until it closes.

pnpm add viem@pr-5601
pnpm add [email protected]

@jxom
jxom merged commit bc5f355 into main Nov 19, 2026
39 of 40 checks passed
@jxom
jxom deleted the fix/ens-avatar-arweave-gateway-slash branch November 19, 2026 01:55
@github-actions github-actions Bot mentioned this pull request Nov 19, 2026

This branch had an error being deployed

1 failed deployment
Preview — e6223475 Deployed Nov 19, 2026 by vercel[bot]
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.

3 participants