Skip to content

Commit 6be379a

Browse files
committed
react: fix native <ConnectEmbed /> component not auto-connecting
1 parent 31d7173 commit 6be379a

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.changeset/eighty-women-allow.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+
react: fix native `<ConnectEmbed />` component not auto-connecting

packages/thirdweb/src/react/native/ui/connect/ConnectModal.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { useDisconnect } from "../../../core/hooks/wallets/useDisconnect.js";
1717
import { useConnectionManager } from "../../../core/providers/connection-manager.js";
1818
import { useWalletInfo } from "../../../core/utils/wallet.js";
1919
import { radius, spacing } from "../../design-system/index.js";
20+
import { useAutoConnect } from "../../hooks/wallets/useAutoConnect.js";
2021
import { getDefaultWallets } from "../../wallets/defaultWallets.js";
2122
import { ThemedButton, ThemedButtonWithIcon } from "../components/button.js";
2223
import { type ContainerType, Header } from "../components/Header.js";
@@ -74,6 +75,11 @@ export function ConnectEmbed(props: ConnectEmbedProps) {
7475
...props,
7576
connectModal: { ...props },
7677
} as ConnectButtonProps;
78+
useAutoConnect({
79+
...props,
80+
siweAuth: siweAuth,
81+
});
82+
7783
return isConnected ? null : (
7884
<ConnectModal
7985
{...adaptedProps}

0 commit comments

Comments
 (0)