File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
web-devtools/src/components/ConnectWallet Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,7 @@ import { Button } from "@kleros/ui-components-library";
8
8
import { SUPPORTED_CHAINS , DEFAULT_CHAIN } from "consts/chains" ;
9
9
10
10
export const SwitchChainButton : React . FC < { className ?: string } > = ( { className } ) => {
11
- // TODO isLoading is not documented, but exists in the type, might have changed to isPending
12
- const { switchChain, isLoading } = useSwitchChain ( ) ;
11
+ const { switchChain, isPending } = useSwitchChain ( ) ;
13
12
const [ , setError ] = useState < string | null > ( null ) ;
14
13
const handleSwitch = useCallback ( ( ) => {
15
14
if ( ! switchChain ) {
@@ -25,8 +24,8 @@ export const SwitchChainButton: React.FC<{ className?: string }> = ({ className
25
24
return (
26
25
< Button
27
26
{ ...{ className } }
28
- isLoading = { isLoading }
29
- disabled = { isLoading }
27
+ isLoading = { isPending }
28
+ disabled = { isPending }
30
29
text = { `Switch to ${ SUPPORTED_CHAINS [ DEFAULT_CHAIN ] . name } ` }
31
30
onClick = { handleSwitch }
32
31
/>
You can’t perform that action at this time.
0 commit comments