Skip to content

[SDK] Fix buyWithCrypto false not respected when returning from quote #7069

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

Conversation

joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented May 16, 2025


PR-Codex overview

This PR addresses an issue where the buyWithCrypto option was not being respected when navigating back from the quote screen. It ensures that the correct payment method is enabled based on the current screen.

Detailed summary

  • Updated the condition in the onBack function to check if enabledPaymentMethods.buyWithCryptoEnabled is true.
  • Ensured that the screen.id checks for buy-with-crypto and buy-with-fiat are properly combined with the new condition.

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

Copy link

vercel bot commented May 16, 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 May 16, 2025 11:37am
login ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 16, 2025 11:37am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 16, 2025 11:37am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 16, 2025 11:37am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 16, 2025 11:37am

Copy link

changeset-bot bot commented May 16, 2025

🦋 Changeset detected

Latest commit: f259dc5

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 May 16, 2025 11:27
@joaquim-verges joaquim-verges requested review from a team as code owners May 16, 2025 11:27
@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels May 16, 2025
Copy link
Member Author

joaquim-verges commented May 16, 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

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 54.14 KB (-0.06% 🔽) 1.1 s (-0.06% 🔽) 138 ms (+113.87% 🔺) 1.3 s
thirdweb (cjs) 194.07 KB (0%) 3.9 s (0%) 280 ms (-0.98% 🔽) 4.2 s
thirdweb (minimal + tree-shaking) 5.68 KB (0%) 114 ms (0%) 67 ms (+1224.97% 🔺) 181 ms
thirdweb/chains (tree-shaking) 524 B (0%) 11 ms (0%) 16 ms (+500.54% 🔺) 26 ms
thirdweb/react (minimal + tree-shaking) 19.53 KB (0%) 391 ms (0%) 58 ms (+357.87% 🔺) 449 ms

Copy link

codecov bot commented May 16, 2025

Codecov Report

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

Project coverage is 55.49%. Comparing base (61152dd) to head (f259dc5).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...act/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx 0.00% 3 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    #7069      +/-   ##
==========================================
+ Coverage   55.47%   55.49%   +0.02%     
==========================================
  Files         909      909              
  Lines       58405    58406       +1     
  Branches     4067     4075       +8     
==========================================
+ Hits        32400    32415      +15     
+ Misses      25902    25886      -16     
- Partials      103      105       +2     
Flag Coverage Δ
packages 55.49% <0.00%> (+0.02%) ⬆️
Files with missing lines Coverage Δ
...act/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx 4.76% <0.00%> (-0.01%) ⬇️

... and 3 files with indirect coverage changes

🚀 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 merged commit da2a2a0 into main May 16, 2025
25 of 26 checks passed
@joaquim-verges joaquim-verges deleted the _SDK_Fix_buyWithCrypto_false_not_respected_when_returning_from_quote branch May 16, 2025 11:57
@joaquim-verges joaquim-verges mentioned this pull request May 16, 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.

1 participant