Skip to content

Commit 5a069fe

Browse files
[PayEmbed] Always connect to destination chain if available (#6967)
1 parent 490497c commit 5a069fe

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/violet-areas-jump.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+
Always connect to destination chain if available in PayEmbed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ function BuyScreenContent(props: BuyScreenContentProps) {
271271
<WalletSwitcherConnectionScreen
272272
accountAbstraction={props.connectOptions?.accountAbstraction}
273273
appMetadata={props.connectOptions?.appMetadata}
274-
chain={props.connectOptions?.chain}
275-
chains={props.connectOptions?.chains}
274+
chain={toChain || props.connectOptions?.chain}
275+
chains={[toChain, ...(props.connectOptions?.chains || [])]}
276276
client={props.client}
277277
connectLocale={props.connectLocale}
278278
isEmbed={props.isEmbed}

0 commit comments

Comments
 (0)