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

fix: update useProfiles when connecting to different account #5089

Conversation

joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Oct 20, 2024

Problem solved

Fixes CNCT-2100


PR-Codex overview

This PR focuses on fixing the useProfiles hook to ensure it updates correctly when connecting to a different account by including the wallet's account address in the query key.

Detailed summary

  • Updated the queryKey in useProfiles for both web and native hooks to include wallet?.getAccount()?.address.
  • This change helps in properly identifying profiles when the user connects a different wallet account.

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

Copy link

changeset-bot bot commented Oct 20, 2024

🦋 Changeset detected

Latest commit: 6e476a8

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 Oct 20, 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 Oct 20, 2024 11:06pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 20, 2024 11:06pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 20, 2024 11:06pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 20, 2024 11:06pm

Copy link

graphite-app bot commented Oct 20, 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
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @joaquim-verges and the rest of your teammates on Graphite Graphite

@joaquim-verges joaquim-verges marked this pull request as ready for review October 20, 2024 22:56
Copy link
Contributor

github-actions bot commented Oct 20, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 42.81 KB (0%) 857 ms (0%) 683 ms (+19.5% 🔺) 1.6 s
thirdweb (cjs) 102.66 KB (0%) 2.1 s (0%) 1.6 s (+1.67% 🔺) 3.6 s
thirdweb (minimal + tree-shaking) 4.84 KB (0%) 97 ms (0%) 67 ms (+19.13% 🔺) 164 ms
thirdweb/chains (tree-shaking) 498 B (0%) 10 ms (0%) 47 ms (-42.12% 🔽) 57 ms
thirdweb/react (minimal + tree-shaking) 17.36 KB (0%) 348 ms (0%) 172 ms (+1.07% 🔺) 519 ms

Copy link

codecov bot commented Oct 21, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 45.29%. Comparing base (df128bf) to head (6e476a8).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...hirdweb/src/react/web/hooks/wallets/useProfiles.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5089   +/-   ##
=======================================
  Coverage   45.29%   45.29%           
=======================================
  Files        1059     1059           
  Lines       54729    54729           
  Branches     3956     3957    +1     
=======================================
+ Hits        24789    24790    +1     
+ Misses      29249    29248    -1     
  Partials      691      691           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from df128bf
packages 40.23% <0.00%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
...hirdweb/src/react/web/hooks/wallets/useProfiles.ts 10.52% <0.00%> (ø)

... and 1 file with indirect coverage changes

@joaquim-verges joaquim-verges merged commit 541bee5 into main Oct 21, 2024
30 of 31 checks passed
@joaquim-verges joaquim-verges deleted the fix_update_useProfiles_when_connecting_to_different_account branch October 21, 2024 09:40
@jnsdls jnsdls mentioned this pull request Oct 21, 2024
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.

1 participant