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

[SDK] Fix: ensure optional chains are passed to wc #4838

Merged
merged 1 commit into from
Sep 28, 2024

Conversation

gregfromstl
Copy link
Member

@gregfromstl gregfromstl commented Sep 28, 2024

PR-Codex overview

This PR focuses on improving the handling of optional chains in the wallet-connect functionality, ensuring that required and optional chains are correctly processed during wallet connection requests.

Detailed summary

  • Updated getChainsToRequest to return requiredChain and optionalChains instead of just chainsToRequest.
  • Modified connectWC and initProvider functions to use requiredChain for the chains parameter.
  • Ensured optionalChains are passed correctly in wallet connect requests.

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

Copy link

changeset-bot bot commented Sep 28, 2024

🦋 Changeset detected

Latest commit: 842baa0

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

This PR includes changesets to release 1 package
Name Type
thirdweb 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 Sep 28, 2024

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 Sep 28, 2024 7:54am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 28, 2024 7:54am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 28, 2024 7:54am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 28, 2024 7:54am

Copy link

graphite-app bot commented Sep 28, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link
Contributor

github-actions bot commented Sep 28, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 41.94 KB (0%) 839 ms (0%) 426 ms (+23.88% 🔺) 1.3 s
thirdweb (cjs) 101.6 KB (0%) 2.1 s (0%) 927 ms (-6.3% 🔽) 3 s
thirdweb (minimal + tree-shaking) 4.82 KB (0%) 97 ms (0%) 107 ms (+116.79% 🔺) 204 ms
thirdweb/chains (tree-shaking) 498 B (0%) 10 ms (0%) 26 ms (+179.54% 🔺) 36 ms
thirdweb/react (minimal + tree-shaking) 16.78 KB (0%) 336 ms (0%) 225 ms (+191.84% 🔺) 560 ms

Copy link

codecov bot commented Sep 28, 2024

Codecov Report

Attention: Patch coverage is 0% with 19 lines in your changes missing coverage. Please review.

Project coverage is 47.70%. Comparing base (601958d) to head (842baa0).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
.../thirdweb/src/wallets/wallet-connect/controller.ts 0.00% 19 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4838      +/-   ##
==========================================
- Coverage   47.73%   47.70%   -0.03%     
==========================================
  Files        1051     1052       +1     
  Lines       56707    56754      +47     
  Branches     3903     3904       +1     
==========================================
+ Hits        27068    27075       +7     
- Misses      28951    28991      +40     
  Partials      688      688              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 601958d
packages 43.44% <0.00%> (-0.03%) ⬇️

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

Files with missing lines Coverage Δ
.../thirdweb/src/wallets/wallet-connect/controller.ts 9.44% <0.00%> (-0.21%) ⬇️

... and 3 files with indirect coverage changes

Copy link

graphite-app bot commented Sep 28, 2024

Merge activity

<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on enhancing the `wallet-connect` functionality by ensuring that optional chains are correctly handled in the wallet connection request process.

### Detailed summary
- Updated the destructuring of the return value from `getChainsToRequest` to include `requiredChain`.
- Changed how `optionalChains` and `chains` are assigned in `connectWC` and `initProvider` functions.
- Modified the return structure of `getChainsToRequest` to include `requiredChain` and `optionalChains`.

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

<!-- end pr-codex -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants