From 861778bfd146c503b48cd516ab08d9dceb5ab28b Mon Sep 17 00:00:00 2001 From: Eric P Date: Thu, 2 Oct 2025 22:13:20 -0500 Subject: [PATCH] Link an lnaddress to its lnurlp well-known page --- ui/src/components/Value/index.tsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ui/src/components/Value/index.tsx b/ui/src/components/Value/index.tsx index d27a4c5..368ef72 100644 --- a/ui/src/components/Value/index.tsx +++ b/ui/src/components/Value/index.tsx @@ -25,6 +25,19 @@ export default class Value extends React.PureComponent { super(props); } + getLink(dest: any): string { + if (dest.type === "lnaddress") { + const match = dest.address.toLowerCase().match(/^([a-z0-9._-]+)@([a-z0-9.-]+)$/); + + if (match) { + const [ _, username, domain ] = match; + return "https://" + domain + "/.well-known/lnurlp/" + username; + } + } + + return "https://amboss.space/node/" + dest.address; + } + render() { const { destinations, model } = this.props const splitTotal = destinations ? destinations.reduce((total, d) => total + parseInt(d.split, 10), 0) : null @@ -48,7 +61,7 @@ export default class Value extends React.PureComponent {
  • {knownDeadNodes[dest.address] && ⚠️} - {dest.name} + {dest.name}
  • ))}