Fix initial value not set from NWC lud16 param (#2567)

This commit is contained in:
ekzyis 2025-09-22 17:10:56 +02:00 committed by GitHub
parent f3ac91abee
commit 53c0f8c277
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -98,7 +98,7 @@ export function useProtocolForm (protocol) {
value = complementaryFormState?.config?.[field.name] value = complementaryFormState?.config?.[field.name]
} }
if (protocol.name === 'LN_ADDR' && field.name === 'address' && lud16Domain && value) { if (protocol.name === 'LN_ADDR' && field.name === 'address' && lud16Domain) {
// automatically set lightning addresses from NWC urls if lud16 parameter is present // automatically set lightning addresses from NWC urls if lud16 parameter is present
if (nwcSendFormState?.config?.url) { if (nwcSendFormState?.config?.url) {
const { lud16 } = parseNwcUrl(nwcSendFormState.config.url) const { lud16 } = parseNwcUrl(nwcSendFormState.config.url)