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: state and local storage sync and persistent when use multiple adapters #3419

Conversation

enesozturk
Copy link
Contributor

@enesozturk enesozturk commented Dec 10, 2024

Description

Refactors state and local storage syncronisation to persist state, specificially for multiple adapter instances.

When we have multiple adapters enabled, we are not handling the initialization of the Appkit depending on the local storage and also not updating the local storage when switching between namespaces.

This PR introduces changes to refactor local storage values, removes CONNECTED_NAMESPACE value since we don't even need it because we have ACTIVE_CAIP_NETWORK_ID value. Also updates controllers and Wagmi adapters depending on these.

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 Dec 10, 2024

Copy link

changeset-bot bot commented Dec 10, 2024

🦋 Changeset detected

Latest commit: 3482663

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

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

💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package or glob expression "@apps/gallery-new" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "@apps/laboratory-new" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "@reown/appkit-new" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "@reown/appkit-scaffold-ui-new" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "@reown/appkit-ui-new" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.

Copy link

vercel bot commented Dec 10, 2024

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

Name Status Preview Comments Updated (UTC)
appkit-builder 🛑 Canceled (Inspect) Dec 10, 2024 5:48pm
appkit-laboratory ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 5:48pm
appkit-vue-solana 🛑 Canceled (Inspect) Dec 10, 2024 5:48pm
appkit-wagmi-cdn-example 🛑 Canceled (Inspect) Dec 10, 2024 5:48pm
vue-wagmi-example 🛑 Canceled (Inspect) Dec 10, 2024 5:48pm

@enesozturk enesozturk force-pushed the enes/apkt-1689-connecting-to-multiple-adapter-instance-with-mm-and branch from b99c0e3 to b6a8dc5 Compare December 10, 2024 14:59
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