From 7eb668e0e2a3baa8f4324b2a49bd49428132c8ba Mon Sep 17 00:00:00 2001 From: Riccardo Balbo Date: Tue, 5 Nov 2024 16:27:48 +0100 Subject: [PATCH] explicit default values --- pages/settings/wallets/[wallet].js | 2 +- wallets/blink/index.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pages/settings/wallets/[wallet].js b/pages/settings/wallets/[wallet].js index b5469e9b..891307ce 100644 --- a/pages/settings/wallets/[wallet].js +++ b/pages/settings/wallets/[wallet].js @@ -38,7 +38,7 @@ export default function WalletSettings () { // 'enabled' and 'priority' which are not defined in wallet.fields. return { ...acc, - [field.name]: wallet?.config?.[field.name] || '' + [field.name]: wallet?.config?.[field.name] || field.defaultValue || '' } }, wallet?.config) diff --git a/wallets/blink/index.js b/wallets/blink/index.js index 7975c9d4..2b3f8f34 100644 --- a/wallets/blink/index.js +++ b/wallets/blink/index.js @@ -24,6 +24,7 @@ export const fields = [ type: 'text', help: 'the blink wallet to use for sending (BTC or USD for stablesats)', placeholder: 'BTC', + defaultValue: 'BTC', clear: true, autoComplete: 'off', clientOnly: true, @@ -49,7 +50,7 @@ export const fields = [ label: 'wallet type', type: 'text', help: 'the blink wallet to use for receiving (only BTC available)', - value: 'BTC', + defaultValue: 'BTC', clear: true, autoComplete: 'off', optional: 'for receiving',