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}
  • ))}