-
Notifications
You must be signed in to change notification settings - Fork 619
[Wagmi Adapter] Fix: use smart account chain in getProvider #6117
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
[Wagmi Adapter] Fix: use smart account chain in getProvider #6117
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: ae675db The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6117 +/- ##
=======================================
Coverage 56.87% 56.87%
=======================================
Files 1153 1153
Lines 63896 63896
Branches 5180 5180
=======================================
Hits 36344 36344
Misses 26825 26825
Partials 727 727
*This pull request uses carry forward flags. Click here to find out more. |
Merge activity
|
size-limit report 📦
|
<!--
## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"
If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):
## Notes for the reviewer
Anything important to call out? Be sure to also clarify these in your comments.
## How to test
Unit tests, playground, etc.
-->
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on fixing the `getProvider` function in the `wagmi-adapter` package to improve the autoconnection behavior with the account factory by enhancing the chain selection logic.
### Detailed summary
- Updated `getProvider` function to include `args.smartAccount?.chain?.id` in chain selection.
- Changed the logic for defining `chain` to prioritize `params?.chainId`, followed by the smart account's chain ID, the last stored chain ID, and defaulting to `1`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
b7209ef to
ae675db
Compare
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
PR-Codex overview
This PR focuses on fixing the
getProviderfunction in the@thirdweb-dev/wagmi-adapterpackage to improve autoconnections with the account factory by including additional logic for determining the chain ID.Detailed summary
getProviderfunction to includeargs.smartAccount?.chain?.idwhen determining thechainvalue.lastChainIdor default to1if no chain ID is provided.