Skip to content

Conversation

@gregfromstl
Copy link
Contributor

@gregfromstl gregfromstl commented Nov 15, 2024

CNCT-2231


PR-Codex overview

This PR introduces a check to limit the number of blockchain chains that can be specified when using the WalletConnect feature, ensuring that no more than 10 chains are accepted.

Detailed summary

  • Added a new constant chains that checks the length of options.chains.
  • If options.chains exceeds 10, it logs a warning and truncates the array to the first 10 chains.
  • If options.chains is within the limit, it returns the original array.

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

@linear
Copy link

linear bot commented Nov 15, 2024

@vercel
Copy link

vercel bot commented Nov 15, 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 Nov 15, 2024 1:12am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 15, 2024 1:12am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 15, 2024 1:12am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 15, 2024 1:12am

@changeset-bot
Copy link

changeset-bot bot commented Nov 15, 2024

⚠️ No Changeset found

Latest commit: 10ca0bc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 15, 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.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 15, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 44.8 KB (0%) 896 ms (0%) 3.5 s (+11.85% 🔺) 4.4 s
thirdweb (cjs) 105.11 KB (0%) 2.2 s (0%) 6.3 s (+31.61% 🔺) 8.4 s
thirdweb (minimal + tree-shaking) 5.72 KB (0%) 115 ms (0%) 552 ms (+13.62% 🔺) 666 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 89 ms (+55.53% 🔺) 99 ms
thirdweb/react (minimal + tree-shaking) 18.79 KB (0%) 376 ms (0%) 1.6 s (+149.13% 🔺) 2 s

@codecov
Copy link

codecov bot commented Nov 15, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 6 lines in your changes missing coverage. Please review.

Project coverage is 45.50%. Comparing base (7b21f1b) to head (10ca0bc).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...rdweb/src/wallets/wallet-connect/receiver/index.ts 33.33% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5427      +/-   ##
==========================================
- Coverage   45.52%   45.50%   -0.02%     
==========================================
  Files        1070     1071       +1     
  Lines       55682    55718      +36     
  Branches     4029     4032       +3     
==========================================
+ Hits        25347    25357      +10     
- Misses      29648    29674      +26     
  Partials      687      687              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 7b21f1b
packages 40.61% <33.33%> (-0.02%) ⬇️

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

Files with missing lines Coverage Δ
...rdweb/src/wallets/wallet-connect/receiver/index.ts 82.71% <33.33%> (-3.00%) ⬇️

... and 5 files with indirect coverage changes

@gregfromstl gregfromstl added the merge-queue Adds the pull request to Graphite's merge queue. label Nov 15, 2024
Copy link
Contributor Author

gregfromstl commented Nov 15, 2024

Merge activity

  • Nov 14, 7:34 PM EST: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Nov 14, 7:45 PM EST: A user added this pull request to the Graphite merge queue.
  • Nov 14, 8:12 PM EST: A user merged this pull request with the Graphite merge queue.

CNCT-2231

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces a validation check for the `chains` option in the WalletConnect integration, ensuring that no more than 10 chains can be specified. If more than 10 chains are provided, a warning is logged, and only the first 10 chains are used.

### Detailed summary
- Added a check for `options.chains` to limit the number of chains to a maximum of 10.
- Implemented a warning message if more than 10 chains are specified, informing the user of the truncation.
- Used `slice(0, 10)` to return only the first 10 chains if the limit is exceeded.

> ✨ 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

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