Skip to content
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

fix: identity call where if the network is not supported by wallet and switched to another one #3881

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

enesozturk
Copy link
Contributor

@enesozturk enesozturk commented Feb 19, 2025

Description

When we connected and if the wallet is not supports the active network, we are switching to first available network on the AppKit. But here we are calling syncIdentity inside of the syncAccount where it's calling the BlockchainAPIController.fetchIdentity. And fetchIdentity is reading the ChainController.state.activeCaipNetwork where it's still the unsupported network even though we switch 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 Feb 19, 2025

Copy link

changeset-bot bot commented Feb 19, 2025

🦋 Changeset detected

Latest commit: 7b3a909

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

This PR includes changesets to release 19 packages
Name Type
@reown/appkit Patch
@reown/appkit-core 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-utils Patch
@reown/appkit-cdn Patch
@reown/appkit-cli Patch
@reown/appkit-common 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 Feb 19, 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 Feb 20, 2025 10:47am
appkit-ethers5-bera ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 20, 2025 10:47am
appkit-laboratory ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 20, 2025 10:47am
next-wagmi-solana-bitcoin-example ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 20, 2025 10:47am
9 Skipped Deployments
Name Status Preview Comments Updated (UTC)
appkit-basic-ep ⬜️ Ignored (Inspect) Feb 20, 2025 10:47am
appkit-basic-ep-example ⬜️ Ignored (Inspect) Feb 20, 2025 10:47am
appkit-basic-example ⬜️ Ignored (Inspect) Feb 20, 2025 10:47am
appkit-basic-sign-client-example ⬜️ Ignored (Inspect) Feb 20, 2025 10:47am
appkit-basic-up-example ⬜️ Ignored (Inspect) Feb 20, 2025 10:47am
appkit-vue-solana ⬜️ Ignored (Inspect) Feb 20, 2025 10:47am
appkit-wagmi-cdn-example ⬜️ Ignored (Inspect) Feb 20, 2025 10:47am
ethereum-provider-wagmi-example ⬜️ Ignored (Inspect) Visit Preview Feb 20, 2025 10:47am
vue-wagmi-example ⬜️ Ignored (Inspect) Feb 20, 2025 10:47am

Copy link
Contributor

Warnings
⚠️ File apps/laboratory/tests/shared/validators/ModalValidator.ts contains a KEY or SECRET
⚠️ File packages/appkit/src/client.ts contains a KEY or SECRET
⚠️ File packages/appkit/tests/client/public-methods.test.ts contains a KEY or SECRET

Generated by 🚫 dangerJS against 7b3a909

Copy link
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 72.28% 23077 / 31926
🔵 Statements 72.28% 23077 / 31926
🔵 Functions 62.2% 1848 / 2971
🔵 Branches 81.02% 3988 / 4922
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/appkit/src/client.ts 59.93% 83.48% 76.68% 59.93% 182-183, 215-216, 236-237, 240-241, 256-259, 262-265, 285-286, 289-290, 306-340, 343-352, 367-368, 618-619, 622-625, 628-629, 632-633, 636-637, 640-641, 648-652, 717-727, 736-761, 768-771, 798-799, 813-814, 823-824, 827-828, 833-834, 858-859, 886-892, 918-929, 932-968, 971-976, 992-996, 1009-1020, 1023-1042, 1045-1051, 1054-1064, 1067-1079, 1082-1084, 1087-1089, 1092-1094, 1097-1099, 1102-1109, 1114-1172, 1180-1192, 1203-1217, 1220-1227, 1230-1241, 1244-1250, 1255, 1259, 1274, 1287-1288, 1296-1299, 1302-1305, 1308-1314, 1324-1325, 1357-1373, 1385-1388, 1392, 1408-1418, 1427-1428, 1434-1439, 1445-1463, 1469-1476, 1480-1495, 1513-1523, 1526-1605, 1608-1628, 1646, 1662-1663, 1669, 1671-1687, 1692, 1704, 1742-1749, 1751-1762, 1765-1773, 1811-1814, 1821-1827, 1834-1835, 1840-1841, 1880-1881, 1894-1895, 1900-1901, 1903-1904, 1909-1912, 1923-1924, 1963-1967, 1992-1993, 2017-2018, 2048-2049, 2053-2054, 2152-2158, 2191-2196, 2198-2208, 2210, 2212-2224, 2226-2240, 308-344
packages/core/src/controllers/BlockchainApiController.ts 35.68% 61.53% 22.22% 35.68% 157-158, 188-198, 203-209, 213-238, 242-269, 273-289, 293-310, 324-325, 343-363, 367-395, 399-426, 438-463, 467-480, 491-498, 502-515, 519-537, 541-569, 573-594, 598-635, 639-651, 654-670, 168-309, 362-669
Generated in workflow #9712 for commit 7b3a909 by the Vitest Coverage Report Action

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