Skip to content

Commit 134573f

Browse files
committed
fix: include AA props in default wallets
1 parent f6ebd54 commit 134573f

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

packages/thirdweb/src/react/web/ui/ConnectWallet/ConnectButton.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,14 @@ export function ConnectButton(props: ConnectButtonProps) {
292292
getDefaultWallets({
293293
appMetadata: props.appMetadata,
294294
chains: props.chains,
295+
executionMode: props.accountAbstraction
296+
? {
297+
mode: "EIP4337",
298+
smartAccount: props.accountAbstraction,
299+
}
300+
: undefined,
295301
}),
296-
[props.wallets, props.appMetadata, props.chains],
302+
[props.wallets, props.appMetadata, props.chains, props.accountAbstraction],
297303
);
298304
const localeQuery = useConnectLocale(props.locale || "en_US");
299305
const connectionManager = useConnectionManager();

packages/thirdweb/src/wallets/defaultWallets.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { Chain } from "../chains/types.js";
22
import { COINBASE, METAMASK, RAINBOW, ZERION } from "./constants.js";
33
import { createWallet } from "./create-wallet.js";
4+
import type { ExecutionModeOptions } from "./in-app/core/wallet/types.js";
45
import type { Wallet } from "./interfaces/wallet.js";
56
import type { AppMetadata } from "./types.js";
67

@@ -10,9 +11,12 @@ import type { AppMetadata } from "./types.js";
1011
export function getDefaultWallets(options?: {
1112
appMetadata?: AppMetadata;
1213
chains?: Chain[];
14+
executionMode?: ExecutionModeOptions;
1315
}): Wallet[] {
1416
return [
15-
createWallet("inApp"),
17+
createWallet("inApp", {
18+
executionMode: options?.executionMode,
19+
}),
1620
createWallet(METAMASK),
1721
createWallet(COINBASE, {
1822
appMetadata: options?.appMetadata,

0 commit comments

Comments
 (0)