Skip to content

[SDK] Test: Adds useSwitchActiveWalletChain test #5835

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

Conversation

gregfromstl
Copy link
Member

@gregfromstl gregfromstl commented Dec 23, 2024

Problem solved

Short description of the bug fixed or feature added


PR-Codex overview

This PR focuses on enhancing error messages for better clarity and adding tests for the useSwitchActiveWalletChain hook to ensure its functionality within the wallet connection manager.

Detailed summary

  • Updated error messages in packages/thirdweb/src/wallets/manager/index.ts for clarity.
  • Introduced tests for useSwitchActiveWalletChain in packages/thirdweb/src/react/core/hooks/wallets/useSwitchActiveWalletChain.test.tsx.
  • Added mock implementations and setup for testing wallet functionality.

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

@gregfromstl gregfromstl requested review from a team as code owners December 23, 2024 22:31
Copy link

linear bot commented Dec 23, 2024

Copy link

changeset-bot bot commented Dec 23, 2024

⚠️ No Changeset found

Latest commit: 0e5e23a

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

Copy link

vercel bot commented Dec 23, 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 Dec 23, 2024 10:50pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 23, 2024 10:50pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 23, 2024 10:50pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 23, 2024 10:50pm

Copy link
Contributor

graphite-app bot commented Dec 23, 2024

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.

Copy link
Contributor

github-actions bot commented Dec 23, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 45.02 KB (0%) 901 ms (0%) 806 ms (+37.08% 🔺) 1.8 s
thirdweb (cjs) 110.76 KB (0%) 2.3 s (0%) 1.3 s (+5.74% 🔺) 3.6 s
thirdweb (minimal + tree-shaking) 5.58 KB (0%) 112 ms (0%) 44 ms (-59.73% 🔽) 156 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 85 ms (+434.25% 🔺) 95 ms
thirdweb/react (minimal + tree-shaking) 19.12 KB (+0.08% 🔺) 383 ms (+0.08% 🔺) 211 ms (+2.93% 🔺) 593 ms

Copy link

codecov bot commented Dec 23, 2024

Codecov Report

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

Project coverage is 54.12%. Comparing base (9bd9923) to head (0e5e23a).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
packages/thirdweb/src/wallets/manager/index.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5835   +/-   ##
=======================================
  Coverage   54.11%   54.12%           
=======================================
  Files        1102     1102           
  Lines       59202    59202           
  Branches     4885     4886    +1     
=======================================
+ Hits        32037    32042    +5     
+ Misses      26441    26436    -5     
  Partials      724      724           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 9bd9923
packages 51.51% <0.00%> (+0.01%) ⬆️

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

Files with missing lines Coverage Δ
packages/thirdweb/src/wallets/manager/index.ts 84.61% <0.00%> (-0.74%) ⬇️

... and 2 files with indirect coverage changes

@gregfromstl gregfromstl merged commit 82667ca into main Dec 23, 2024
28 of 31 checks passed
@gregfromstl gregfromstl deleted the greg/tool-2838-sdk-bundler-url-reportedly-not-updated-when-chain-changed branch December 23, 2024 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages SDK Involves changes to the thirdweb SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant