Skip to content

Commit 0316704

Browse files
committed
Add account address and remove switch chain condition
1 parent 99a7cc1 commit 0316704

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

quick-starts/react-solana-quick-start/src/components/getBalance.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ export function Balance() {
3333

3434
return (
3535
<div>
36+
<h2>Account Address</h2>
37+
<div>
38+
{accounts?.[0]}
39+
</div>
3640
<h2>Balance</h2>
3741
<div>
3842
{balance !== null && `${balance / LAMPORTS_PER_SOL} SOL`}

quick-starts/react-solana-quick-start/src/components/switchNetwork.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ export function SwitchChain() {
1010
<h2>Switch Chain</h2>
1111
<h3>Connected to {web3Auth?.currentChain?.displayName}</h3>
1212
{web3Auth?.coreOptions.chains?.map((chain) => {
13-
if (chain.chainId === "0x67" || chain.chainId === "0x66" || chain.chainId === "0x65") {
1413
return (
1514
<button
1615
disabled={web3Auth?.currentChain?.chainId === chain.chainId}
@@ -22,9 +21,7 @@ export function SwitchChain() {
2221
{chain.displayName}
2322
</button>
2423
)
25-
}
2624
})}
27-
2825
{error?.message}
2926
</div>
3027
)

0 commit comments

Comments
 (0)