Skip to content

Commit 876f6ff

Browse files
committed
fix: useSwitchChain isLoading -> isPending
1 parent 3fbb460 commit 876f6ff

File tree

1 file changed

+3
-4
lines changed
  • web-devtools/src/components/ConnectWallet

1 file changed

+3
-4
lines changed

web-devtools/src/components/ConnectWallet/index.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ import { Button } from "@kleros/ui-components-library";
88
import { SUPPORTED_CHAINS, DEFAULT_CHAIN } from "consts/chains";
99

1010
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();
1312
const [, setError] = useState<string | null>(null);
1413
const handleSwitch = useCallback(() => {
1514
if (!switchChain) {
@@ -25,8 +24,8 @@ export const SwitchChainButton: React.FC<{ className?: string }> = ({ className
2524
return (
2625
<Button
2726
{...{ className }}
28-
isLoading={isLoading}
29-
disabled={isLoading}
27+
isLoading={isPending}
28+
disabled={isPending}
3029
text={`Switch to ${SUPPORTED_CHAINS[DEFAULT_CHAIN].name}`}
3130
onClick={handleSwitch}
3231
/>

0 commit comments

Comments
 (0)