Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fifty-turtles-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"thirdweb": patch
---

Prevent admin wallet from connecting when no IAW config is specified
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,14 @@
getDefaultWallets({
appMetadata: props.appMetadata,
chains: props.chains,
executionMode: props.accountAbstraction
? {
mode: "EIP4337",
smartAccount: props.accountAbstraction,
}

Check warning on line 299 in packages/thirdweb/src/react/web/ui/ConnectWallet/ConnectButton.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/ui/ConnectWallet/ConnectButton.tsx#L296-L299

Added lines #L296 - L299 were not covered by tests
: undefined,
}),
[props.wallets, props.appMetadata, props.chains],
[props.wallets, props.appMetadata, props.chains, props.accountAbstraction],
);
const localeQuery = useConnectLocale(props.locale || "en_US");
const connectionManager = useConnectionManager();
Expand Down
6 changes: 5 additions & 1 deletion packages/thirdweb/src/wallets/defaultWallets.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Chain } from "../chains/types.js";
import { COINBASE, METAMASK, RAINBOW, ZERION } from "./constants.js";
import { createWallet } from "./create-wallet.js";
import type { ExecutionModeOptions } from "./in-app/core/wallet/types.js";
import type { Wallet } from "./interfaces/wallet.js";
import type { AppMetadata } from "./types.js";

Expand All @@ -10,9 +11,12 @@ import type { AppMetadata } from "./types.js";
export function getDefaultWallets(options?: {
appMetadata?: AppMetadata;
chains?: Chain[];
executionMode?: ExecutionModeOptions;
}): Wallet[] {
return [
createWallet("inApp"),
createWallet("inApp", {
executionMode: options?.executionMode,
}),
createWallet(METAMASK),
createWallet(COINBASE, {
appMetadata: options?.appMetadata,
Expand Down
Loading