mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-24 22:19:37 -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 [refundAddress, setRefundAddress] = useState("");
|
||||||
const [useExternalRefundAddress, setUseExternalRefundAddress] =
|
const [useExternalRefundAddress, setUseExternalRefundAddress] =
|
||||||
useState(false);
|
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 [redeemAddressValid, setRedeemAddressValid] = useState(false);
|
||||||
const [refundAddressValid, setRefundAddressValid] = useState(false);
|
const [refundAddressValid, setRefundAddressValid] = useState(false);
|
||||||
|
@ -38,34 +40,14 @@ export default function InitPage() {
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Paper variant="outlined" style={{}}>
|
<Paper variant="outlined" style={{}}>
|
||||||
<Tabs
|
<MoneroAddressTextField
|
||||||
value={useExternalRedeemAddress ? 1 : 0}
|
label="Monero redeem address"
|
||||||
indicatorColor="primary"
|
address={redeemAddress}
|
||||||
variant="fullWidth"
|
onAddressChange={setRedeemAddress}
|
||||||
onChange={(_, newValue) =>
|
onAddressValidityChange={setRedeemAddressValid}
|
||||||
setUseExternalRedeemAddress(newValue === 1)
|
fullWidth
|
||||||
}
|
helperText="The monero will be sent to this address"
|
||||||
>
|
/>
|
||||||
<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>
|
|
||||||
</Paper>
|
</Paper>
|
||||||
|
|
||||||
<Paper variant="outlined" style={{}}>
|
<Paper variant="outlined" style={{}}>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue