Skip to content

Commit

Permalink
Update EmbeddedWallet name in CW (#2290)
Browse files Browse the repository at this point in the history
  • Loading branch information
MananTank authored Feb 9, 2024
1 parent 0155adc commit f85806c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/nice-glasses-dream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@thirdweb-dev/react": patch
---

Update EmbeddedWallet name in ConnectWallet UI
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,29 @@ export const embeddedWallet = (

const { auth } = finalOptions;

let name = "Email & Socials";

// if only email is enabled, show the name as "Email"
if (
finalOptions?.auth?.options.length === 1 &&
finalOptions.auth.options[0] === "email"
) {
name = "Email";
}

// if email is not enabled, show the name as "Social Login"
if (finalOptions?.auth?.options.indexOf("email") === -1) {
name = "Social Login";
}

return {
category: "socialLogin",
isHeadless: true,
id: EmbeddedWallet.id,
recommended: finalOptions?.recommended,
meta: {
...EmbeddedWallet.meta,
name: "Email",
name,
iconURL: emailIcon,
},
create(walletOptions: WalletOptions) {
Expand Down

0 comments on commit f85806c

Please sign in to comment.