Skip to content

Commit

Permalink
fix: login card addition of btc network
Browse files Browse the repository at this point in the history
  • Loading branch information
guru-web3 committed Feb 3, 2025
1 parent 882bcc7 commit 63760ec
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
10 changes: 7 additions & 3 deletions demo/redirect-flow-example/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useEffect, useState } from "react";
import {
WEB3AUTH_NETWORK,
COREKIT_STATUS,
makeEthereumSigner,
AggregateVerifierLoginParams,
Expand Down Expand Up @@ -101,7 +100,7 @@ const uiConsole = (...args: any[]): void => {
export const DEFAULT_CHAIN_CONFIG: CustomChainConfig = {
chainNamespace: CHAIN_NAMESPACES.EIP155,
chainId: "0x66eee", // Arbitrum Sepolia chain ID
rpcTarget: "https://arbitrum-sepolia.blockpi.network/v1/rpc/private",
rpcTarget: "https://sepolia-rollup.arbitrum.io/rpc",
displayName: "Arbitrum Sepolia Testnet",
blockExplorerUrl: "https://sepolia.arbiscan.io", // Arbitrum Sepolia block explorer URL
ticker: "ETH",
Expand Down Expand Up @@ -189,10 +188,15 @@ function App() {
throw new Error("initiated to login");
}
const verifierConfig = {
aggregateVerifierIdentifier: "aggregate-sapphire",
subVerifierDetails: {
typeOfLogin: "google",
verifier: "w3-google-temp",
verifier: "w3-google-dev",
// verifier: "w3-google-temp",
clientId: "759944447575-6rm643ia1i9ngmnme3eq5viiep5rp6s0.apps.googleusercontent.com",
jwtParams: {
verifierIdField: "email",
},
},
};
// const verifierConfig = {
Expand Down
15 changes: 13 additions & 2 deletions demo/redirect-flow-example/src/components/LoginCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface LoginCardProps {
handleSocialLogin: (item: SocialLoginObj) => void;
}

const LoginCard: React.FC<LoginCardProps> = ({ handleEmailPasswordLess, handleSocialLogin }) => {
const LoginCard: React.FC<LoginCardProps> = ({ handleEmailPasswordLess, handleSocialLogin }): React.ReactElement => {
const { setKeyType } = useCoreKit();
const [loginHint, setLoginHint] = React.useState<string>("");
const [defaultValue, setDefaultValue] = React.useState(localStorage.getItem("keyType") || KeyType.secp256k1);
Expand All @@ -28,8 +28,19 @@ const LoginCard: React.FC<LoginCardProps> = ({ handleEmailPasswordLess, handleSo
{
name: "Solana (ed25519)",
value: KeyType.ed25519,
icon: <img src={"https://solana.tor.us/img/icon-solana.fb290bef.svg"} alt={"Solana"} width={20} height={20} className="h-5 w-5" />,
},
{
name: "Bitcoin (secp256k1)",
value: "BTC",
icon: (
<img src={"https://solana.com/_next/static/media/solanaLogoMark.17260911.svg"} alt={"Solana"} width={20} height={20} className="h-5 w-5" />
<img
src={"https://upload.wikimedia.org/wikipedia/commons/thumb/4/46/Bitcoin.svg/128px-Bitcoin.svg.png"}
alt={"Bitcoin"}
width={20}
height={20}
className="h-5 w-5"
/>
),
},
];
Expand Down

0 comments on commit 63760ec

Please sign in to comment.