From 4676fbaf605c37f1a026d6edac8c623ef0b8244d Mon Sep 17 00:00:00 2001 From: ekzyis Date: Mon, 22 Sep 2025 00:46:27 +0200 Subject: [PATCH] Also check protocol name before setting address field (#2562) * Also check protocol name before setting address field * Add comment why we remove the domain part if lud16Domain is set --------- Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com> --- wallets/client/components/form/hooks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wallets/client/components/form/hooks.js b/wallets/client/components/form/hooks.js index c00a2f5e..b5fcc990 100644 --- a/wallets/client/components/form/hooks.js +++ b/wallets/client/components/form/hooks.js @@ -98,7 +98,7 @@ export function useProtocolForm (protocol) { value = complementaryFormState?.config?.[field.name] } - if (protocol.name === 'LN_ADDR' && field.name === 'address') { + if (protocol.name === 'LN_ADDR' && field.name === 'address' && lud16Domain && value) { // automatically set lightning addresses from NWC urls if lud16 parameter is present if (nwcSendFormState?.config?.url) { const { lud16 } = parseNwcUrl(nwcSendFormState.config.url)