From 13ac96a7e45002e3b5f8625b3f5bc40c66c31fd0 Mon Sep 17 00:00:00 2001 From: Daniel Isaac Geslin Date: Mon, 23 Sep 2024 10:16:45 +0200 Subject: [PATCH] [QA] [Improvement] Don't show Fastest label when only one route is available --- wormhole-connect/src/views/v2/Bridge/Routes/index.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/wormhole-connect/src/views/v2/Bridge/Routes/index.tsx b/wormhole-connect/src/views/v2/Bridge/Routes/index.tsx index c232397db..eb8bdae06 100644 --- a/wormhole-connect/src/views/v2/Bridge/Routes/index.tsx +++ b/wormhole-connect/src/views/v2/Bridge/Routes/index.tsx @@ -57,21 +57,19 @@ const Routes = ({ ...props }: Props) => { const { classes } = useStyles(); const [showAll, setShowAll] = useState(false); - const { amount, routeStates } = useSelector( - (state: RootState) => state.transferInput, - ); + const { amount } = useSelector((state: RootState) => state.transferInput); const { sending: sendingWallet, receiving: receivingWallet } = useSelector( (state: RootState) => state.wallet, ); const supportedRoutes = useMemo(() => { - if (!routeStates) { + if (!props.routes) { return []; } - return routeStates.filter((rs) => rs.supported); - }, [routeStates]); + return props.routes.filter((rs) => rs.supported); + }, [props.routes]); const walletsConnected = useMemo( () => !!sendingWallet.address && !!receivingWallet.address,