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 {
21
21
StateType as UseAsyncStateType ,
22
22
} from "../../hooks/use-async" ;
23
23
import { useData , StateType as UseDataStateType } from "../../hooks/use-data" ;
24
+ import { useNetwork } from "../../hooks/use-network" ;
24
25
import { useToast } from "../../hooks/use-toast" ;
25
26
import { Button } from "../Button" ;
27
+ import { Switch } from "../Switch" ;
26
28
27
29
const MAX_TEST_RETRIES = 10 ;
28
30
@@ -65,13 +67,14 @@ const ConnectWallet = ({ isLoading }: { isLoading?: boolean | undefined }) => {
65
67
const showModal = useCallback ( ( ) => {
66
68
modal . setVisible ( true ) ;
67
69
} , [ modal ] ) ;
70
+ const { isMainnet, toggleMainnet } = useNetwork ( ) ;
68
71
69
72
return (
70
73
< >
71
74
< Description className = "mb-10 text-neutral-400" >
72
75
Please connect your wallet to get started.
73
76
</ Description >
74
- < div className = "flex justify- center" >
77
+ < div className = "flex flex-col items- center gap-4 " >
75
78
< Button
76
79
className = "px-10 py-4"
77
80
size = "nopad"
@@ -87,6 +90,14 @@ const ConnectWallet = ({ isLoading }: { isLoading?: boolean | undefined }) => {
87
90
</ >
88
91
) }
89
92
</ 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
+ />
90
101
</ div >
91
102
</ >
92
103
) ;
You can’t perform that action at this time.
0 commit comments