Skip to content

fix: appkit default network if storage value doesn't exist #4103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

enesozturk
Copy link
Contributor

@enesozturk enesozturk commented Mar 28, 2025

Description

Fixes issue where switchin between appkit instances result network to be not detected as expected.

When AppKit initialized, if local storage active CAIP network value is something AppKit doesn't support, AppKit will redirect to first available network.

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

For Linear issues: Closes APKT-xxx
For GH issues: closes #...

Showcase (Optional)

If there is a UI change include the screenshots with before and after state.
If new feature is being introduced, include the link to demo recording.

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

Copy link

linear bot commented Mar 28, 2025

Copy link

changeset-bot bot commented Mar 28, 2025

🦋 Changeset detected

Latest commit: 4e41ed9

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

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

Copy link

vercel bot commented Mar 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
appkit-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 28, 2025 11:53am
appkit-laboratory ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 28, 2025 11:53am
12 Skipped Deployments
Name Status Preview Comments Updated (UTC)
appkit-basic-ep ⬜️ Ignored (Inspect) Mar 28, 2025 11:53am
appkit-basic-ep-example ⬜️ Ignored (Inspect) Mar 28, 2025 11:53am
appkit-basic-example ⬜️ Ignored (Inspect) Mar 28, 2025 11:53am
appkit-basic-sign-client-example ⬜️ Ignored (Inspect) Mar 28, 2025 11:53am
appkit-basic-up-example ⬜️ Ignored (Inspect) Mar 28, 2025 11:53am
appkit-ethers5-bera ⬜️ Ignored (Inspect) Mar 28, 2025 11:53am
appkit-nansen-demo ⬜️ Ignored (Inspect) Mar 28, 2025 11:53am
appkit-vue-solana ⬜️ Ignored (Inspect) Mar 28, 2025 11:53am
appkit-wagmi-cdn-example ⬜️ Ignored (Inspect) Mar 28, 2025 11:53am
ethereum-provider-wagmi-example ⬜️ Ignored (Inspect) Visit Preview Mar 28, 2025 11:53am
next-wagmi-solana-bitcoin-example ⬜️ Ignored (Inspect) Mar 28, 2025 11:53am
vue-wagmi-example ⬜️ Ignored (Inspect) Mar 28, 2025 11:53am

Copy link
Contributor

github-actions bot commented Mar 28, 2025

Warnings
⚠️ File packages/appkit-utils/src/CaipNetworkUtil.ts contains a KEY or SECRET
⚠️ File packages/appkit/src/client/appkit-base-client.ts contains a KEY or SECRET

Generated by 🚫 dangerJS against 4e41ed9

@enesozturk enesozturk enabled auto-merge (squash) March 28, 2025 11:23
Copy link
Contributor

github-actions bot commented Mar 28, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 75.2% 24859 / 33054
🔵 Statements 75.2% 24859 / 33054
🔵 Functions 66.34% 2101 / 3167
🔵 Branches 82.95% 4756 / 5733
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/appkit-utils/src/CaipNetworkUtil.ts 99.49% 98.64% 95.65% 99.49% 243
packages/appkit/src/client/appkit-base-client.ts 73.01% 86.58% 76.84% 73.01% 163-164, 166-167, 172-173, 241-242, 278-284, 313-332, 335-373, 376-381, 397-401, 414-425, 450-456, 459-469, 472-484, 487-489, 492-494, 497-499, 502-504, 507-513, 516-519, 535-547, 553-586, 589-599, 653-654, 660, 671-685, 691-698, 711-715, 755-756, 797-801, 807-808, 820, 843-848, 914, 935-936, 942, 944-960, 965, 1003-1004, 1020-1021, 1026-1027, 1060-1067, 1112-1116, 1145-1148, 1152, 1168-1178, 1200-1201, 1230-1231, 1238-1239, 1243-1244, 1411-1412, 1432-1433, 1436-1437, 1452-1455, 1458-1459, 1479-1480, 1483-1484, 1504-1505, 1518, 1522, 1527-1546, 1549-1558, 1573-1574, 1617-1620, 1623-1624, 1712-1713, 1716-1719, 1722-1723, 1726-1727, 1730-1731, 1734-1735, 1738-1742, 1807-1818, 1827-1849, 1529-1550
Generated in workflow #10527 for commit 4e41ed9 by the Vitest Coverage Report Action

@enesozturk enesozturk merged commit afc0739 into main Mar 28, 2025
31 checks passed
@enesozturk enesozturk deleted the enes/apkt-2180-sumsub-edge-case-with-localstorage-causing-unknown-network branch March 28, 2025 12:04
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.

2 participants