Skip to content

Conversation

@gregfromstl
Copy link
Contributor

@gregfromstl gregfromstl commented Jan 30, 2025


PR-Codex overview

This PR focuses on fixing the getProvider function in the @thirdweb-dev/wagmi-adapter package to improve autoconnections with the account factory by including additional logic for determining the chain ID.

Detailed summary

  • Updated getProvider function to include args.smartAccount?.chain?.id when determining the chain value.
  • Ensured fallback to lastChainId or default to 1 if no chain ID is provided.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@linear
Copy link

linear bot commented Jan 30, 2025

@vercel
Copy link

vercel bot commented Jan 30, 2025

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

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 30, 2025 7:20pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 30, 2025 7:20pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 30, 2025 7:20pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 30, 2025 7:20pm

@changeset-bot
Copy link

changeset-bot bot commented Jan 30, 2025

🦋 Changeset detected

Latest commit: ae675db

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

This PR includes changesets to release 1 package
Name Type
@thirdweb-dev/wagmi-adapter 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

@codecov
Copy link

codecov bot commented Jan 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.87%. Comparing base (54c9333) to head (ae675db).
Report is 1 commits behind head on main.

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           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 54c9333
packages 55.07% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

Copy link
Contributor Author

gregfromstl commented Jan 30, 2025

Merge activity

  • Jan 30, 2:17 PM EST: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Jan 30, 2:17 PM EST: A user added this pull request to the Graphite merge queue.
  • Jan 30, 2:21 PM EST: A user merged this pull request with the Graphite merge queue.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 30, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 46.6 KB (0%) 933 ms (0%) 253 ms (-4.06% 🔽) 1.2 s
thirdweb (cjs) 122.39 KB (0%) 2.5 s (0%) 504 ms (-17.45% 🔽) 3 s
thirdweb (minimal + tree-shaking) 5.58 KB (0%) 112 ms (0%) 109 ms (+376.94% 🔺) 221 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 18 ms (+252.79% 🔺) 28 ms
thirdweb/react (minimal + tree-shaking) 19.28 KB (0%) 386 ms (0%) 95 ms (+9.83% 🔺) 480 ms

<!--

## 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 -->
@graphite-app graphite-app bot force-pushed the greg/tool-3271-fix-autoconnect-failing-in-prod branch from b7209ef to ae675db Compare January 30, 2025 19:18
@graphite-app graphite-app bot merged commit ae675db into main Jan 30, 2025
31 checks passed
@graphite-app graphite-app bot deleted the greg/tool-3271-fix-autoconnect-failing-in-prod branch January 30, 2025 19:21
@graphite-app
Copy link
Contributor

graphite-app bot commented Jan 30, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-queue Adds the pull request to Graphite's merge queue. packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants