Skip to content

Commit

Permalink
Merge pull request #1540 from riccardobl/inputdefault
Browse files Browse the repository at this point in the history
add explicit support for default values in input fields
  • Loading branch information
huumn authored Nov 5, 2024
2 parents 7efd089 + cd4fcdf commit 532abcb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pages/settings/wallets/[wallet].js
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 2 additions & 0 deletions wallets/blink/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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',
Expand Down

0 comments on commit 532abcb

Please sign in to comment.