diff --git a/new-lamassu-admin/src/pages/Blacklist/Blacklist.js b/new-lamassu-admin/src/pages/Blacklist/Blacklist.js index 8c680f25..c23e5fef 100644 --- a/new-lamassu-admin/src/pages/Blacklist/Blacklist.js +++ b/new-lamassu-admin/src/pages/Blacklist/Blacklist.js @@ -71,43 +71,41 @@ const PaperWalletDialog = ({ onConfirmed, onDissmised, open, props }) => { const classes = useStyles() return ( - <> - -
- - - -
-

- {'Are you sure you want to enable this?'} -

- - {`This mode means that only paper wallets will be printed for users, and they won't be permitted to scan an address from their own wallet.`} - {`This mode is only useful for countries like Switzerland which mandates such a feature.\n`} - {`Don't enable this if you want users to be able to scan an address of their choosing.`} - - - - - -
- + +
+ + + +
+

+ {'Are you sure you want to enable this?'} +

+ + {`This mode means that only paper wallets will be printed for users, and they won't be permitted to scan an address from their own wallet.`} + {`This mode is only useful for countries like Switzerland which mandates such a feature.\n`} + {`Don't enable this if you want users to be able to scan an address of their choosing.`} + + + + + +
) } @@ -154,7 +152,7 @@ const Blacklist = () => { const rejectAddressReuse = complianceConfig?.rejectAddressReuse ?? false - const enablePaperWalletOnly = complianceConfig?.enablePaperWalletOnly ?? false + const enablePaperWalletOnly = !!complianceConfig.enablePaperWalletOnly const addressReuseSave = rawConfig => { const config = toNamespace('compliance')(rawConfig) @@ -242,15 +240,13 @@ const Blacklist = () => {

Enable paper wallet (only)

{ - if (enablePaperWalletOnly) { - addressReuseSave({ - enablePaperWalletOnly: event.target.checked - }) - } else { - setConfirmDialog(true) - } - }} + onChange={e => + enablePaperWalletOnly + ? addressReuseSave({ + enablePaperWalletOnly: e.target.checked + }) + : setConfirmDialog(true) + } value={enablePaperWalletOnly} /> {enablePaperWalletOnly ? 'On' : 'Off'}