explicit default values

This commit is contained in:
Riccardo Balbo 2024-11-05 16:27:48 +01:00
parent 3112fc30d8
commit 7eb668e0e2
2 changed files with 3 additions and 2 deletions

View File

@ -38,7 +38,7 @@ export default function WalletSettings () {
// 'enabled' and 'priority' which are not defined in wallet.fields. // 'enabled' and 'priority' which are not defined in wallet.fields.
return { return {
...acc, ...acc,
[field.name]: wallet?.config?.[field.name] || '' [field.name]: wallet?.config?.[field.name] || field.defaultValue || ''
} }
}, wallet?.config) }, wallet?.config)

View File

@ -24,6 +24,7 @@ export const fields = [
type: 'text', type: 'text',
help: 'the blink wallet to use for sending (BTC or USD for stablesats)', help: 'the blink wallet to use for sending (BTC or USD for stablesats)',
placeholder: 'BTC', placeholder: 'BTC',
defaultValue: 'BTC',
clear: true, clear: true,
autoComplete: 'off', autoComplete: 'off',
clientOnly: true, clientOnly: true,
@ -49,7 +50,7 @@ export const fields = [
label: 'wallet type', label: 'wallet type',
type: 'text', type: 'text',
help: 'the blink wallet to use for receiving (only BTC available)', help: 'the blink wallet to use for receiving (only BTC available)',
value: 'BTC', defaultValue: 'BTC',
clear: true, clear: true,
autoComplete: 'off', autoComplete: 'off',
optional: 'for receiving', optional: 'for receiving',