Skip to content

Commit e701530

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

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
@@ -512,8 +512,9 @@ function BuyScreenContent(props: BuyScreenContentProps) {
512512
client={client}
513513
onBack={() => {
514514
if (
515-
screen.id === "buy-with-crypto" ||
516-
screen.id === "buy-with-fiat"
515+
(screen.id === "buy-with-crypto" ||
516+
screen.id === "buy-with-fiat") &&
517+
enabledPaymentMethods.buyWithCryptoEnabled
517518
) {
518519
setScreen({
519520
id: "select-from-token",

0 commit comments

Comments
 (0)