Skip to content

Commit

Permalink
fix: don't disable button when refreshing routes
Browse files Browse the repository at this point in the history
  • Loading branch information
chybisov committed Jun 9, 2023
1 parent d64220e commit 398e70b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/widget/src/pages/MainPage/MainSwapButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const MainSwapButton: React.FC = () => {
const { isValid, isValidating } = useFormState();
const setExecutableRoute = useSetExecutableRoute();

const { routes: swapRoutes, isLoading, isFetching } = useSwapRoutes();
const { routes: swapRoutes } = useSwapRoutes();

const currentRoute = swapRoutes?.[0];

Expand All @@ -27,9 +27,7 @@ export const MainSwapButton: React.FC = () => {
<SwapButton
onClick={handleClick}
route={currentRoute}
disabled={
currentRoute && (isLoading || isFetching || isValidating || !isValid)
}
disabled={currentRoute && (isValidating || !isValid)}
/>
);
};

0 comments on commit 398e70b

Please sign in to comment.