Skip to content

Conversation

@joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Jan 27, 2025


title: "[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.


PR-Codex overview

This PR focuses on fixing the autoconnection of in-app wallets in React Native by improving the handling of the authentication token retrieval and ensuring compatibility with non-web contexts.

Detailed summary

  • Updated getUrlToken to return undefined instead of an empty object when not in a web context.
  • Introduced a wallet variable to unify the management of adminWallet and activeWallet.
  • Adjusted conditions to check for wallet instead of activeWallet.
  • Modified tests for getUrlToken to expect undefined rather than an empty object.
  • Changed the handling of the return values from getUrlToken in autoConnectCore to use the new structure.

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

@vercel
Copy link

vercel bot commented Jan 27, 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 28, 2025 1:21am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 28, 2025 1:21am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 28, 2025 1:21am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 28, 2025 1:21am

@changeset-bot
Copy link

changeset-bot bot commented Jan 27, 2025

🦋 Changeset detected

Latest commit: e2a232e

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

This PR includes changesets to release 2 packages
Name Type
thirdweb Patch
@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

@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Jan 27, 2025
Copy link
Member Author

joaquim-verges commented Jan 27, 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.

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

@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 46.85 KB (0%) 938 ms (0%) 739 ms (+49.79% 🔺) 1.7 s
thirdweb (cjs) 123.65 KB (0%) 2.5 s (0%) 1.6 s (+0.18% 🔺) 4 s
thirdweb (minimal + tree-shaking) 5.59 KB (0%) 112 ms (0%) 230 ms (+551.6% 🔺) 342 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 18 ms (+0.23% 🔺) 28 ms
thirdweb/react (minimal + tree-shaking) 19.08 KB (0%) 382 ms (0%) 140 ms (+8.64% 🔺) 522 ms

@codecov
Copy link

codecov bot commented Jan 28, 2025

Codecov Report

Attention: Patch coverage is 86.36364% with 3 lines in your changes missing coverage. Please review.

Project coverage is 55.03%. Comparing base (86f205e) to head (e2a232e).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
...eb/ui/ConnectWallet/screens/ManageWalletScreen.tsx 60.00% 2 Missing ⚠️
...thirdweb/src/wallets/connection/autoConnectCore.ts 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6076      +/-   ##
==========================================
+ Coverage   55.01%   55.03%   +0.01%     
==========================================
  Files        1152     1152              
  Lines       61280    61284       +4     
  Branches     5186     5182       -4     
==========================================
+ Hits        33716    33726      +10     
+ Misses      26834    26828       -6     
  Partials      730      730              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 86f205e
packages 52.73% <86.36%> (+0.01%) ⬆️

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

Files with missing lines Coverage Δ
...irdweb/src/wallets/in-app/web/lib/get-url-token.ts 100.00% <100.00%> (ø)
...thirdweb/src/wallets/connection/autoConnectCore.ts 88.61% <91.66%> (ø)
...eb/ui/ConnectWallet/screens/ManageWalletScreen.tsx 72.27% <60.00%> (-0.46%) ⬇️

... and 3 files with indirect coverage changes

@joaquim-verges joaquim-verges merged commit 1401f8d into main Jan 28, 2025
31 of 32 checks passed
@joaquim-verges joaquim-verges deleted the _SDK_fix_Auto-connection_of_in-app_wallets_in_React_Native branch January 28, 2025 18:13
@joaquim-verges joaquim-verges mentioned this pull request Jan 28, 2025
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.

3 participants