diff --git a/src/services/main/applicationManager.ts b/src/services/main/applicationManager.ts index dbaa3bc1..8e699c91 100644 --- a/src/services/main/applicationManager.ts +++ b/src/services/main/applicationManager.ts @@ -132,6 +132,7 @@ export default class { } async GetAppUserLNURLInfo(appId: string, req: Types.GetAppUserLNURLInfoRequest): Promise { const user = await this.storage.applicationStorage.GetApplicationUser(appId, req.user_identifier) - return this.paymentManager.GetLnurlPayInfoFromUser(user.user.user_id, req.base_url_override) + const app = await this.storage.applicationStorage.GetApplication(appId) + return this.paymentManager.GetLnurlPayInfoFromUser(user.user.user_id, app, req.base_url_override) } } \ No newline at end of file diff --git a/src/services/main/paymentManager.ts b/src/services/main/paymentManager.ts index 8d5b6cd8..8c1aab29 100644 --- a/src/services/main/paymentManager.ts +++ b/src/services/main/paymentManager.ts @@ -204,8 +204,8 @@ export default class { } } - async GetLnurlPayInfoFromUser(userId: string, baseUrl?: string): Promise { - const payK1 = await this.storage.paymentStorage.AddUserEphemeralKey(userId, 'pay') + async GetLnurlPayInfoFromUser(userId: string, linkedApplication?: Application, baseUrl?: string): Promise { + const payK1 = await this.storage.paymentStorage.AddUserEphemeralKey(userId, 'pay', linkedApplication) const url = baseUrl ? baseUrl : `${this.settings.serviceUrl}/api/guest/lnurl_pay/handle` return { tag: 'payRequest',