Skip to content

Commit

Permalink
Rename showWalletModals to showPasskeyHelpers (#795)
Browse files Browse the repository at this point in the history
* Rename showWalletModals to showPasskeyHelpers

* lint fix

* added changeset
  • Loading branch information
jmderby authored Oct 24, 2024
1 parent 993d27b commit e9f1b9c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/spicy-dodos-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@crossmint/client-sdk-react-ui": minor
---

Breaking Change: Renamed showWalletModals to showPasskeyHelpers
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export type CrossmintAuthWalletConfig = {
defaultChain: EVMSmartWalletChain;
createOnLogin: "all-users" | "off";
type: "evm-smart-wallet";
showWalletModals?: boolean;
showPasskeyHelpers?: boolean;
};

export type LoginMethod = "email" | "google" | "farcaster";
Expand Down Expand Up @@ -153,7 +153,7 @@ export function CrossmintAuthProvider({
>
<CrossmintWalletProvider
defaultChain={embeddedWallets.defaultChain}
showWalletModals={embeddedWallets.showWalletModals}
showPasskeyHelpers={embeddedWallets.showPasskeyHelpers}
appearance={appearance}
>
<AuthFormProvider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ export type WalletConfig = WalletParams & { type: "evm-smart-wallet" };
export function CrossmintWalletProvider({
children,
defaultChain,
showWalletModals = true, // enabled by default
showPasskeyHelpers = true, // enabled by default
appearance,
}: {
children: ReactNode;
defaultChain: EVMSmartWalletChain;
showWalletModals?: boolean;
showPasskeyHelpers?: boolean;
appearance?: UIConfig;
}) {
const { crossmint } = useCrossmint("CrossmintWalletProvider must be used within CrossmintProvider");
Expand Down Expand Up @@ -99,7 +99,7 @@ export function CrossmintWalletProvider({
};

const enhanceConfigWithPasskeyPrompts = (config: WalletConfig) => {
if (showWalletModals && (config.signer as PasskeySigner).type === "PASSKEY") {
if (showPasskeyHelpers && (config.signer as PasskeySigner).type === "PASSKEY") {
return {
...config,
signer: {
Expand Down

0 comments on commit e9f1b9c

Please sign in to comment.