diff --git a/src/renderer/components/alert/ConfidentialityAlert.tsx b/src/renderer/components/alert/ConfidentialityAlert.tsx index 16027f45..abfa3056 100644 --- a/src/renderer/components/alert/ConfidentialityAlert.tsx +++ b/src/renderer/components/alert/ConfidentialityAlert.tsx @@ -2,7 +2,7 @@ import { Alert } from '@material-ui/lab'; export default function ConfidentialityAlert() { return ( - + This page contains confidential information including private keys. Keep this information to yourself. You will lose your funds if you do not! diff --git a/src/renderer/components/alert/RemainingFundsWillBeUsedAlert.tsx b/src/renderer/components/alert/RemainingFundsWillBeUsedAlert.tsx new file mode 100644 index 00000000..c142bbb0 --- /dev/null +++ b/src/renderer/components/alert/RemainingFundsWillBeUsedAlert.tsx @@ -0,0 +1,33 @@ +import { Alert } from '@material-ui/lab'; +import { Box, makeStyles } from '@material-ui/core'; +import { useAppSelector } from '../../../store/hooks'; +import WalletRefreshButton from '../pages/wallet/WalletRefreshButton'; + +const useStyles = makeStyles((theme) => ({ + outer: { + paddingBottom: theme.spacing(1), + }, +})); + +export default function RemainingFundsWillBeUsedAlert() { + const classes = useStyles(); + const balance = useAppSelector((s) => s.balance.balanceValue); + + if (balance == null || balance <= 0) { + return <>; + } + + return ( + + } + variant="filled" + > + The remaining funds of {balance} BTC in the wallet will be used for the + next swap. If the remaining funds exceed the minimum swap amount of the + provider, a swap will be initiated instantaneously. + + + ); +} diff --git a/src/renderer/components/alert/SwapMightBeCancelledAlert.tsx b/src/renderer/components/alert/SwapMightBeCancelledAlert.tsx index 0a5ce2e9..fb560cf1 100644 --- a/src/renderer/components/alert/SwapMightBeCancelledAlert.tsx +++ b/src/renderer/components/alert/SwapMightBeCancelledAlert.tsx @@ -33,7 +33,7 @@ export default function SwapMightBeCancelledAlert({ } return ( - + Be careful! The swap provider has taken a long time to lock their Monero. This might mean that: diff --git a/src/renderer/components/alert/SwapTxLockStatusAlert.tsx b/src/renderer/components/alert/SwapTxLockStatusAlert.tsx index b2ce62b2..c0981beb 100644 --- a/src/renderer/components/alert/SwapTxLockStatusAlert.tsx +++ b/src/renderer/components/alert/SwapTxLockStatusAlert.tsx @@ -68,6 +68,7 @@ export default function SwapTxLockStatusAlert({ key={dbState.swapId} severity="warning" action={} + variant="filled" > Swap {dbState.swapId} is unfinished diff --git a/src/renderer/components/modal/swap/pages/init/InitPage.tsx b/src/renderer/components/modal/swap/pages/init/InitPage.tsx index 419a57cb..a10c8304 100644 --- a/src/renderer/components/modal/swap/pages/init/InitPage.tsx +++ b/src/renderer/components/modal/swap/pages/init/InitPage.tsx @@ -6,6 +6,7 @@ import MoneroAddressTextField from 'renderer/components/inputs/MoneroAddressText import { useAppSelector } from 'store/hooks'; import PlayArrowIcon from '@material-ui/icons/PlayArrow'; import { isTestnet } from '../../../../../../store/config'; +import RemainingFundsWillBeUsedAlert from '../../../../alert/RemainingFundsWillBeUsedAlert'; const useStyles = makeStyles((theme) => ({ initButton: { @@ -53,6 +54,7 @@ export default function InitPage() { return ( + Please specify the address to which the Monero should be sent upon completion of the swap and the address for receiving a Bitcoin refund if diff --git a/src/renderer/components/navigation/FundsLeftInWalletAlert.tsx b/src/renderer/components/navigation/FundsLeftInWalletAlert.tsx index 73f5fc9a..0f9c98a3 100644 --- a/src/renderer/components/navigation/FundsLeftInWalletAlert.tsx +++ b/src/renderer/components/navigation/FundsLeftInWalletAlert.tsx @@ -10,6 +10,7 @@ export default function FundsLeftInWalletAlert() { if (fundsLeft != null && fundsLeft > 0) { return (