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

[SDK] feat: Add fiat value display to buy token input #6193

Merged

Conversation

joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Feb 7, 2025


PR-Codex overview

This PR focuses on enhancing the BuyTokenInput component by introducing a new FiatValue component that displays the fiat equivalent of the token amount, improving user experience on the payment screen.

Detailed summary

  • Added a new FiatValue component to show fiat amounts.
  • Updated BuyTokenInput to include FiatValue.
  • Exported the TextProps type from text.tsx.
  • Introduced getTokenAddress function in nativeToken.ts.
  • Added necessary imports in multiple files for the new functionality.

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

Copy link

changeset-bot bot commented Feb 7, 2025

🦋 Changeset detected

Latest commit: 8460583

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

This PR includes changesets to release 3 packages
Name Type
thirdweb Patch
@thirdweb-dev/wagmi-adapter Patch
thirdweb-login 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 Feb 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ❌ Failed (Inspect) Feb 7, 2025 0:10am
login ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 7, 2025 0:10am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 7, 2025 0:10am
thirdweb-www ❌ Failed (Inspect) Feb 7, 2025 0:10am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 7, 2025 0:10am

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

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

Copy link
Contributor

github-actions bot commented Feb 7, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 46.21 KB (0%) 925 ms (0%) 723 ms (+48.63% 🔺) 1.7 s
thirdweb (cjs) 121.82 KB (0%) 2.5 s (0%) 918 ms (-21.17% 🔽) 3.4 s
thirdweb (minimal + tree-shaking) 5.6 KB (0%) 112 ms (0%) 96 ms (+90.77% 🔺) 208 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 47 ms (+358.12% 🔺) 57 ms
thirdweb/react (minimal + tree-shaking) 19.29 KB (0%) 386 ms (0%) 189 ms (+64.49% 🔺) 574 ms

Copy link

codecov bot commented Feb 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.78%. Comparing base (6ec60f0) to head (a4404f2).

Additional details and impacted files
@@                                   Coverage Diff                                    @@
##           _SDK_feat_Add_editable_token_amount_input_to_buy_screen    #6193   +/-   ##
========================================================================================
  Coverage                                                    56.78%   56.78%           
========================================================================================
  Files                                                         1160     1160           
  Lines                                                        64179    64178    -1     
  Branches                                                      5195     5195           
========================================================================================
  Hits                                                         36441    36441           
+ Misses                                                       27010    27009    -1     
  Partials                                                       728      728           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 6ec60f0
packages 54.96% <ø> (+<0.01%) ⬆️ Carriedforward from 6ec60f0

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

Files with missing lines Coverage Δ
...i/ConnectWallet/screens/Buy/swap/BuyTokenInput.tsx 10.66% <ø> (+0.07%) ⬆️
.../react/web/ui/ConnectWallet/screens/nativeToken.ts 100.00% <ø> (ø)
...ages/thirdweb/src/react/web/ui/components/text.tsx 100.00% <ø> (ø)

Base automatically changed from _SDK_feat_Add_editable_token_amount_input_to_buy_screen to main February 7, 2025 11:54
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