add env variable for lightning domain leveraging redirect capability
This commit is contained in:
parent
c90def94a7
commit
92176bea83
3 changed files with 14 additions and 5 deletions
|
|
@ -148,8 +148,8 @@ export default class WalletService extends BaseService {
|
|||
payLink.lnurl = `${baseUrl}/lnurlp/${payLink.id}`
|
||||
|
||||
if (payLink.username) {
|
||||
// Extract domain from base URL
|
||||
const domain = new URL(baseUrl).hostname
|
||||
// Use custom Lightning domain if configured, otherwise extract from base URL
|
||||
const domain = config.api.lightningDomain || new URL(baseUrl).hostname
|
||||
payLink.lnaddress = `${payLink.username}@${domain}`
|
||||
}
|
||||
|
||||
|
|
@ -310,8 +310,9 @@ export default class WalletService extends BaseService {
|
|||
if (response.ok) {
|
||||
const links = await response.json()
|
||||
const baseUrl = config.api.baseUrl
|
||||
const domain = new URL(baseUrl).hostname
|
||||
|
||||
// Use custom Lightning domain if configured, otherwise extract from base URL
|
||||
const domain = config.api.lightningDomain || new URL(baseUrl).hostname
|
||||
|
||||
// Add LNURL and Lightning Address to each link
|
||||
this._payLinks.value = links.map((link: PayLink) => ({
|
||||
...link,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue