bridge_ui: Click arrow to swap source and target chains
This commit is contained in:
parent
f90ed66ca0
commit
21c3f143db
|
@ -4,7 +4,7 @@ import {
|
||||||
CHAIN_ID_SOLANA,
|
CHAIN_ID_SOLANA,
|
||||||
} from "@certusone/wormhole-sdk";
|
} from "@certusone/wormhole-sdk";
|
||||||
import { getAddress } from "@ethersproject/address";
|
import { getAddress } from "@ethersproject/address";
|
||||||
import { Button, makeStyles, Typography } from "@material-ui/core";
|
import { Button, IconButton, makeStyles, Typography } from "@material-ui/core";
|
||||||
import { ArrowForward, VerifiedUser } from "@material-ui/icons";
|
import { ArrowForward, VerifiedUser } from "@material-ui/icons";
|
||||||
import { useCallback, useMemo } from "react";
|
import { useCallback, useMemo } from "react";
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
|
@ -136,6 +136,7 @@ function Source() {
|
||||||
const handleNextClick = useCallback(() => {
|
const handleNextClick = useCallback(() => {
|
||||||
dispatch(incrementStep());
|
dispatch(incrementStep());
|
||||||
}, [dispatch]);
|
}, [dispatch]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<StepDescription>
|
<StepDescription>
|
||||||
|
@ -169,7 +170,14 @@ function Source() {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className={classes.chainSelectArrow}>
|
<div className={classes.chainSelectArrow}>
|
||||||
<ArrowForward style={{ margin: "0px 8px" }} />
|
<IconButton
|
||||||
|
onClick={() => {
|
||||||
|
dispatch(setSourceChain(targetChain));
|
||||||
|
}}
|
||||||
|
disabled={shouldLockFields}
|
||||||
|
>
|
||||||
|
<ArrowForward />
|
||||||
|
</IconButton>
|
||||||
</div>
|
</div>
|
||||||
<div className={classes.chainSelectContainer}>
|
<div className={classes.chainSelectContainer}>
|
||||||
<Typography variant="caption">Target</Typography>
|
<Typography variant="caption">Target</Typography>
|
||||||
|
|
Loading…
Reference in New Issue