Skip to content

Commit 75cbe64

Browse files
fix: force wallet chain switch in Pay UI (#5302)
1 parent f79ddf8 commit 75cbe64

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/fuzzy-lobsters-deliver.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 Pay UI not force switching connected wallet chain

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,8 @@ function SwapScreenContent(props: {
984984

985985
const disableContinue =
986986
(swapRequired && !quoteQuery.data) || isNotEnoughBalance;
987-
const switchChainRequired = props.payer.chain.id !== fromChain.id;
987+
const switchChainRequired =
988+
props.payer.wallet.getChain()?.id !== fromChain.id;
988989

989990
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
990991
function getErrorMessage(err: any) {

0 commit comments

Comments
 (0)