Skip to content

[SDK] Fix loading state in PayEmbed source tokens #6778

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

Merged

Conversation

joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Apr 19, 2025


PR-Codex overview

This PR focuses on improving the loading state handling in the TokenSelectorScreen component of the thirdweb package, ensuring that the UI properly reflects loading conditions when certain data is unavailable.

Detailed summary

  • Updated the conditional check in the TokenSelectorScreen.tsx to include checks for chainInfo.data and props.sourceSupportedTokens.
  • Added a minimum height of 350px to the WalletRowWithBalances component's style for better layout consistency.

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

Copy link

vercel bot commented Apr 19, 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 Apr 21, 2025 9:46pm
login ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 21, 2025 9:46pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 21, 2025 9:46pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 21, 2025 9:46pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 21, 2025 9:46pm

Copy link

changeset-bot bot commented Apr 19, 2025

🦋 Changeset detected

Latest commit: 30a4aec

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

@joaquim-verges joaquim-verges marked this pull request as ready for review April 19, 2025 09:14
@joaquim-verges joaquim-verges requested review from a team as code owners April 19, 2025 09:14
@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Apr 19, 2025
Copy link
Member Author


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.

Copy link
Contributor

github-actions bot commented Apr 19, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 50.73 KB (0%) 1.1 s (0%) 129 ms (+88.33% 🔺) 1.2 s
thirdweb (cjs) 138.79 KB (0%) 2.8 s (0%) 234 ms (+28.19% 🔺) 3.1 s
thirdweb (minimal + tree-shaking) 5.6 KB (0%) 113 ms (0%) 67 ms (+1430.83% 🔺) 179 ms
thirdweb/chains (tree-shaking) 514 B (0%) 11 ms (0%) 41 ms (+1547.4% 🔺) 51 ms
thirdweb/react (minimal + tree-shaking) 19.41 KB (0%) 389 ms (0%) 55 ms (+258.6% 🔺) 443 ms

@joaquim-verges joaquim-verges force-pushed the _SDK_Fix_loading_state_in_PayEmbed_source_tokens branch from 2e64029 to 30a4aec Compare April 21, 2025 21:05
Copy link

codecov bot commented Apr 21, 2025

Codecov Report

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

Project coverage is 55.18%. Comparing base (d7dc83f) to head (30a4aec).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ectWallet/screens/Buy/swap/TokenSelectorScreen.tsx 0.00% 7 Missing ⚠️

❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6778      +/-   ##
==========================================
- Coverage   55.18%   55.18%   -0.01%     
==========================================
  Files         896      896              
  Lines       56934    56940       +6     
  Branches     3944     3943       -1     
==========================================
  Hits        31420    31420              
- Misses      25418    25424       +6     
  Partials       96       96              
Flag Coverage Δ
packages 55.18% <0.00%> (-0.01%) ⬇️
Files with missing lines Coverage Δ
...ectWallet/screens/Buy/swap/TokenSelectorScreen.tsx 6.48% <0.00%> (-0.10%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@joaquim-verges joaquim-verges mentioned this pull request Apr 21, 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.

2 participants