aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/zaps.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/features/zaps.js')
-rw-r--r--src/features/zaps.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/features/zaps.js b/src/features/zaps.js
index 2667921..71a94af 100644
--- a/src/features/zaps.js
+++ b/src/features/zaps.js
@@ -156,6 +156,15 @@ export function zapsFeature(ctx) {
onClick: () => begin(target, display),
}, '⚡ ' + t('lnZapOffer', { addr: display }));
},
+ // The names feature resolves user@domain over DNS first (BIP-353) and
+ // lands here when the name has no DNS record — the classic LNURL path.
+ lnAddressFallback(text) {
+ if (!canPay() || !ui.send || ui.send.recipients.length !== 1) return false;
+ const target = parseZapTarget(text);
+ if (!target || target.kind === 'npub') return false;
+ begin(target, target.address || String(text).trim());
+ return true;
+ },
// True when an npub can be zapped over Lightning from this build/wallet —
// ark's "no Ark address" screen checks this before offering the fallback.
canLnZap() { return canPay() && !!wallet.nostrProfile; },