mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-24 14:15:55 -04:00
feat(gui): Hide redeem to internal address for now
This commit is contained in:
parent
56722a5780
commit
b8204d5352
1 changed files with 12 additions and 30 deletions
|
@ -12,8 +12,10 @@ export default function InitPage() {
|
|||
const [refundAddress, setRefundAddress] = useState("");
|
||||
const [useExternalRefundAddress, setUseExternalRefundAddress] =
|
||||
useState(false);
|
||||
const [useExternalRedeemAddress, setUseExternalRedeemAddress] =
|
||||
useState(false);
|
||||
|
||||
// We force this to true for now because the internal wallet is not really accessible from the GUI yet
|
||||
const [useExternalRedeemAddress, _setUseExternalRedeemAddress] =
|
||||
useState(true);
|
||||
|
||||
const [redeemAddressValid, setRedeemAddressValid] = useState(false);
|
||||
const [refundAddressValid, setRefundAddressValid] = useState(false);
|
||||
|
@ -38,34 +40,14 @@ export default function InitPage() {
|
|||
}}
|
||||
>
|
||||
<Paper variant="outlined" style={{}}>
|
||||
<Tabs
|
||||
value={useExternalRedeemAddress ? 1 : 0}
|
||||
indicatorColor="primary"
|
||||
variant="fullWidth"
|
||||
onChange={(_, newValue) =>
|
||||
setUseExternalRedeemAddress(newValue === 1)
|
||||
}
|
||||
>
|
||||
<Tab label="Redeem to internal Monero wallet" value={0} />
|
||||
<Tab label="Redeem to external Monero address" value={1} />
|
||||
</Tabs>
|
||||
<Box style={{ padding: "16px" }}>
|
||||
{useExternalRedeemAddress ? (
|
||||
<MoneroAddressTextField
|
||||
label="External Monero redeem address"
|
||||
address={redeemAddress}
|
||||
onAddressChange={setRedeemAddress}
|
||||
onAddressValidityChange={setRedeemAddressValid}
|
||||
helperText="The monero will be sent to this address if the swap is successful."
|
||||
fullWidth
|
||||
/>
|
||||
) : (
|
||||
<Typography variant="caption">
|
||||
The Monero will be sent to the internal Monero wallet of the GUI.
|
||||
You can then withdraw them from there or use them for another swap directly.
|
||||
</Typography>
|
||||
)}
|
||||
</Box>
|
||||
<MoneroAddressTextField
|
||||
label="Monero redeem address"
|
||||
address={redeemAddress}
|
||||
onAddressChange={setRedeemAddress}
|
||||
onAddressValidityChange={setRedeemAddressValid}
|
||||
fullWidth
|
||||
helperText="The monero will be sent to this address"
|
||||
/>
|
||||
</Paper>
|
||||
|
||||
<Paper variant="outlined" style={{}}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue