File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
apps/staking/src/components/WalletTester Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,10 @@ import {
2121 StateType as UseAsyncStateType ,
2222} from "../../hooks/use-async" ;
2323import { useData , StateType as UseDataStateType } from "../../hooks/use-data" ;
24+ import { useNetwork } from "../../hooks/use-network" ;
2425import { useToast } from "../../hooks/use-toast" ;
2526import { Button } from "../Button" ;
27+ import { Switch } from "../Switch" ;
2628
2729const MAX_TEST_RETRIES = 10 ;
2830
@@ -65,13 +67,14 @@ const ConnectWallet = ({ isLoading }: { isLoading?: boolean | undefined }) => {
6567 const showModal = useCallback ( ( ) => {
6668 modal . setVisible ( true ) ;
6769 } , [ modal ] ) ;
70+ const { isMainnet, toggleMainnet } = useNetwork ( ) ;
6871
6972 return (
7073 < >
7174 < Description className = "mb-10 text-neutral-400" >
7275 Please connect your wallet to get started.
7376 </ Description >
74- < div className = "flex justify- center" >
77+ < div className = "flex flex-col items- center gap-4 " >
7578 < Button
7679 className = "px-10 py-4"
7780 size = "nopad"
@@ -87,6 +90,14 @@ const ConnectWallet = ({ isLoading }: { isLoading?: boolean | undefined }) => {
8790 </ >
8891 ) }
8992 </ Button >
93+ < Switch
94+ isSelected = { isMainnet }
95+ postLabel = "Mainnet"
96+ preLabel = "Devnet"
97+ className = "px-4 py-1"
98+ size = "small"
99+ onChange = { toggleMainnet }
100+ />
90101 </ div >
91102 </ >
92103 ) ;
You can’t perform that action at this time.
0 commit comments