79 lines
3.1 KiB
JavaScript
79 lines
3.1 KiB
JavaScript
import { Box, FormControl, InputAdornment, InputLabel, OutlinedInput, Typography } from "@mui/material";
|
|
import Modal from "../../../components/Modal/Modal";
|
|
|
|
const BondSettingsModal = props => {
|
|
return (
|
|
<Modal
|
|
id="hades"
|
|
maxWidth="468px"
|
|
minHeight="350px"
|
|
open={props.open}
|
|
headerText="Settings"
|
|
onClose={props.handleClose}
|
|
>
|
|
<Box>
|
|
<InputLabel htmlFor="slippage">Slippage</InputLabel>
|
|
<Box mt="8px">
|
|
<FormControl variant="outlined" color="primary" fullWidth>
|
|
<OutlinedInput
|
|
inputProps={{ "data-testid": "slippage" }}
|
|
type="number"
|
|
id="slippage"
|
|
value={props.slippage}
|
|
onChange={props.onSlippageChange}
|
|
endAdornment={<InputAdornment position="end">%</InputAdornment>}
|
|
/>
|
|
</FormControl>
|
|
</Box>
|
|
<Box mt="8px">
|
|
<Typography variant="body2" color="textSecondary">
|
|
Transaction may revert if price changes by more than slippage %
|
|
</Typography>
|
|
</Box>
|
|
</Box>
|
|
|
|
<Box mt="32px">
|
|
<InputLabel htmlFor="decimals">Decimal representation</InputLabel>
|
|
<Box mt="8px">
|
|
<FormControl variant="outlined" color="primary" fullWidth>
|
|
<OutlinedInput
|
|
inputProps={{ "data-testid": "decimals" }}
|
|
type="number"
|
|
id="decimals"
|
|
value={props.formatDecimals}
|
|
onChange={props.onDecimalsChange}
|
|
/>
|
|
</FormControl>
|
|
</Box>
|
|
<Box mt="8px">
|
|
<Typography variant="body2" color="textSecondary">
|
|
Number of decimals to be shown in token balances
|
|
</Typography>
|
|
</Box>
|
|
</Box>
|
|
|
|
<Box mt="32px">
|
|
<InputLabel htmlFor="recipient">Recipient Address</InputLabel>
|
|
<Box mt="8px">
|
|
<FormControl variant="outlined" color="primary" fullWidth>
|
|
<OutlinedInput
|
|
inputProps={{ "data-testid": "recipient" }}
|
|
type="text"
|
|
id="recipient"
|
|
value={props.recipientAddress}
|
|
onChange={props.onRecipientAddressChange}
|
|
/>
|
|
</FormControl>
|
|
</Box>
|
|
<Box mt="8px">
|
|
<Typography variant="body2" color="textSecondary">
|
|
Custom recipient address of bonded assets
|
|
</Typography>
|
|
</Box>
|
|
</Box>
|
|
</Modal>
|
|
);
|
|
};
|
|
|
|
export default BondSettingsModal;
|