diff --git a/pages/settings/wallets/[wallet].js b/pages/settings/wallets/[wallet].js index f7b9d857..0f077415 100644 --- a/pages/settings/wallets/[wallet].js +++ b/pages/settings/wallets/[wallet].js @@ -36,9 +36,11 @@ export default function WalletSettings () { schema={lnbitsSchema} onSubmit={async ({ enabled, ...values }) => { try { + const newConfig = !wallet.isConfigured await wallet.validate(values) wallet.saveConfig(values) - if (enabled) wallet.enable() + // enable wallet if checkbox was set or if wallet was just configured + if (enabled || newConfig) wallet.enable() else wallet.disable() toaster.success('saved settings') router.push('/settings/wallets')