Skip to content

Commit da2a2a0

Browse files
[SDK] Fix buyWithCrypto false not respected when returning from quote (#7069)
1 parent e62fd3f commit da2a2a0

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.changeset/rich-peaches-cheer.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Fix buyWithCrypto false not respected when going back from quote

packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,8 +510,9 @@ function BuyScreenContent(props: BuyScreenContentProps) {
510510
client={client}
511511
onBack={() => {
512512
if (
513-
screen.id === "buy-with-crypto" ||
514-
screen.id === "buy-with-fiat"
513+
(screen.id === "buy-with-crypto" ||
514+
screen.id === "buy-with-fiat") &&
515+
enabledPaymentMethods.buyWithCryptoEnabled
515516
) {
516517
setScreen({
517518
id: "select-from-token",

0 commit comments

Comments
 (0)