import { useSelector } from "react-redux";
import { abstract } from "wagmi/chains";

import type { ReduxStateType } from "@store/types";

export const useIsAbstractNetwork = () => {
	const { fromChainId, toChainId } = useSelector(
		(state: ReduxStateType) => state.quoteParams,
	);

	return fromChainId === abstract.id || toChainId === abstract.id;
};
