Skip to content

Commit 4698681

Browse files
authored
Merge branch 'main' into feat-skipFetchSetup-support
2 parents cd3e850 + 328ef5d commit 4698681

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.changeset/swift-rockets-brake.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@thirdweb-dev/react-native": patch
3+
---
4+
5+
Hide WC modal back button when only WC is defined as a supportedWallet

packages/react-native/src/evm/wallets/wallets/wallet-connect/WalletConnectUI.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ const MODAL_HEIGHT = Dimensions.get("window").height * 0.5;
4141
export function WalletConnectUI({
4242
connected,
4343
walletConfig,
44-
goBack,
4544
projectId,
45+
goBack,
46+
supportedWallets,
4647
}: ConnectUIProps<WalletConnect> & { projectId: string }) {
4748
const l = useLocale();
4849
const theme = useGlobalTheme();
@@ -163,7 +164,7 @@ export function WalletConnectUI({
163164
style={[styles.modal, { backgroundColor: theme.colors.background }]}
164165
>
165166
<ModalHeaderTextClose
166-
onBackPress={goBack}
167+
onBackPress={supportedWallets.length === 1 ? undefined : goBack}
167168
headerText="WalletConnect"
168169
onClose={onClosePress}
169170
paddingHorizontal="md"

0 commit comments

Comments
 (0)