Skip to content

Commit

Permalink
Merge pull request #8 from ChanX21/feat/integrate-web3auth
Browse files Browse the repository at this point in the history
improve web3auth modal ui
  • Loading branch information
ChanX21 authored Sep 8, 2024
2 parents 47d92e8 + f309a3f commit 39b0637
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion packages/nextjs/services/web3/RainbowWeb3authConnector.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Wallet, WalletDetailsParams } from "@rainbow-me/rainbowkit";
import { CHAIN_NAMESPACES, WEB3AUTH_NETWORK } from "@web3auth/base";
import { CHAIN_NAMESPACES, UX_MODE, WEB3AUTH_NETWORK } from "@web3auth/base";
import { EthereumPrivateKeyProvider } from "@web3auth/ethereum-provider";
import { Web3Auth } from "@web3auth/modal";
import { Web3AuthConnector } from "@web3auth/web3auth-wagmi-connector";
Expand Down Expand Up @@ -28,6 +28,18 @@ const web3AuthInstance = new Web3Auth({
clientId,
web3AuthNetwork: WEB3AUTH_NETWORK.SAPPHIRE_DEVNET,
privateKeyProvider,
uiConfig: {
mode: "dark",
useLogoLoader: true,
logoLight: "https://cryptologos.cc/logos/ethereum-eth-logo.png",
logoDark: "https://cryptologos.cc/logos/ethereum-eth-logo.png",
defaultLanguage: "en",
theme: {
primary: "#768729",
},
uxMode: UX_MODE.REDIRECT,
modalZIndex: "2147483647",
},
});

export const rainbowWeb3AuthConnector = (): Wallet => ({
Expand Down

0 comments on commit 39b0637

Please sign in to comment.