Skip to content

fix(common): parse numeric string EVM chain IDs#5692

Open
daixihegu wants to merge 1 commit into
reown-com:mainfrom
daixihegu:main
Open

fix(common): parse numeric string EVM chain IDs#5692
daixihegu wants to merge 1 commit into
reown-com:mainfrom
daixihegu:main

Conversation

@daixihegu

Copy link
Copy Markdown

Description

This PR updates NetworkUtil.parseEvmChainId to support numeric string chain IDs such as "1" and "42".

Previously, numeric strings were treated like CAIP network IDs and returned NaN. The helper now preserves existing CAIP parsing for values like eip155:1, returns numeric inputs as-is, and parses non-CAIP string chain IDs with Number(...).

Type of change

  • Chore (non-breaking change that addresses non-functional tasks, maintenance, or code quality improvements)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Associated Issues

N/A

Showcase (Optional)

N/A - utility-only change.

Checklist

  • Code in this PR is covered by automated tests (Unit tests, E2E tests)
  • My changes generate no new warnings
  • I have reviewed my own code
  • I have filled out all required sections
  • I have tested my changes on the preview link
  • Approver of this PR confirms that the changes are tested on the preview link

Signed-off-by: daixihegu <daixihegu@163.com>
@changeset-bot

changeset-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e2cf88c

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

This PR includes changesets to release 26 packages
Name Type
@reown/appkit-common Patch
@reown/appkit-adapter-bitcoin Patch
@reown/appkit-adapter-ethers Patch
@reown/appkit-adapter-ethers5 Patch
@reown/appkit-adapter-solana Patch
@reown/appkit-adapter-ton Patch
@reown/appkit-adapter-tron Patch
@reown/appkit-adapter-wagmi Patch
@reown/appkit Patch
@reown/appkit-universal-connector Patch
@reown/appkit-ui Patch
@reown/appkit-controllers Patch
@reown/appkit-utils Patch
@reown/appkit-scaffold-ui Patch
@reown/appkit-wallet Patch
@reown/appkit-siwe Patch
@reown/appkit-siwx Patch
@reown/appkit-wallet-button Patch
@reown/appkit-experimental Patch
@reown/appkit-pay Patch
@reown/appkit-cdn Patch
@reown/appkit-testing Patch
@reown/appkit-core Patch
@reown/appkit-polyfills Patch
@reown/appkit-cli Patch
@reown/appkit-codemod 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

@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CTA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@vercel

vercel Bot commented Jun 25, 2026

Copy link
Copy Markdown

@daixihegu is attempting to deploy a commit to the Reown Team on Vercel.

A member of the Team first needs to authorize it.

@daixihegu

Copy link
Copy Markdown
Author

I have read the CTA Document and I hereby sign the CTA

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