Merge pull request #1540 from riccardobl/inputdefault

add explicit support for default values in input fields
This commit is contained in:
Keyan 2024-11-05 09:37:23 -06:00 committed by GitHub
commit 532abcb486
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -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)

View File

@ -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,
@ -50,6 +51,7 @@ export const fields = [
label: 'receive wallet type',
type: 'text',
help: 'the blink wallet to use for receiving (only BTC available)',
defaultValue: 'BTC',
clear: true,
autoComplete: 'off',
placeholder: 'BTC',