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] fix: Handle comma decimal input in PayEmbed #6386

Merged

Conversation

joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Mar 1, 2025

Fixes #6337

Copy link

vercel bot commented Mar 1, 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 Mar 1, 2025 8:14am
login ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 1, 2025 8:14am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 1, 2025 8:14am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 1, 2025 8:14am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 1, 2025 8:14am

Copy link

changeset-bot bot commented Mar 1, 2025

🦋 Changeset detected

Latest commit: 6f11f25

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 Mar 1, 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.

@joaquim-verges joaquim-verges marked this pull request as ready for review March 1, 2025 08:06
@joaquim-verges joaquim-verges requested review from a team as code owners March 1, 2025 08:06
@joaquim-verges joaquim-verges changed the title [thirdweb] fix: Handle comma decimal input in PayEmbed [SDK] fix: Handle comma decimal input in PayEmbed Mar 1, 2025
@@ -654,6 +654,9 @@ function SelectedTokenInfo(props: {
onChange={(e) => {
let value = e.target.value;

// Replace comma with period if it exists
value = value.replace(",", ".");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using replaceAll() instead of replace() since the input may contain multiple commas that need to be converted to decimal points. Example: "1,234,56" -> "1.234.56"

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

Copy link
Contributor

github-actions bot commented Mar 1, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 46.82 KB (0%) 937 ms (0%) 177 ms (+120.05% 🔺) 1.2 s
thirdweb (cjs) 127.18 KB (0%) 2.6 s (0%) 296 ms (+23.82% 🔺) 2.9 s
thirdweb (minimal + tree-shaking) 5.6 KB (0%) 112 ms (0%) 74 ms (+621.28% 🔺) 186 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 28 ms (+686.69% 🔺) 38 ms
thirdweb/react (minimal + tree-shaking) 19.38 KB (0%) 388 ms (0%) 81 ms (+313.26% 🔺) 468 ms

Copy link

codecov bot commented Mar 1, 2025

Codecov Report

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

Project coverage is 54.72%. Comparing base (879148f) to head (6f11f25).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...act/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx 0.00% 1 Missing ⚠️
...i/ConnectWallet/screens/Buy/swap/BuyTokenInput.tsx 0.00% 1 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    #6386   +/-   ##
=======================================
  Coverage   54.71%   54.72%           
=======================================
  Files         874      874           
  Lines       54617    54619    +2     
  Branches     3717     3718    +1     
=======================================
+ Hits        29885    29890    +5     
+ Misses      24637    24634    -3     
  Partials       95       95           
Flag Coverage Δ
packages 54.72% <0.00%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
...act/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx 4.51% <0.00%> (-0.01%) ⬇️
...i/ConnectWallet/screens/Buy/swap/BuyTokenInput.tsx 7.82% <0.00%> (-0.07%) ⬇️

... and 2 files with indirect coverage changes

@joaquim-verges joaquim-verges merged commit c3b90a6 into main Mar 3, 2025
34 of 35 checks passed
@joaquim-verges joaquim-verges deleted the _thirdweb_fix_Handle_comma_decimal_input_in_PayEmbed branch March 3, 2025 00:21
@joaquim-verges joaquim-verges mentioned this pull request Mar 3, 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.

Cannot Enter Decimal Point on Numeric Keyboard in Buy Modal
1 participant