Skip to content

Commit

Permalink
[QA] [Improvement] Don't show Fastest label when only one route is av…
Browse files Browse the repository at this point in the history
…ailable
  • Loading branch information
danielisaacgeslin committed Sep 23, 2024
1 parent 418068b commit 13ac96a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions wormhole-connect/src/views/v2/Bridge/Routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 13ac96a

Please sign in to comment.