From 494277a2d5d60e31a33e44861f5b191f7635eb37 Mon Sep 17 00:00:00 2001 From: hatim Date: Fri, 12 May 2023 21:48:53 +0200 Subject: [PATCH] fix --- src/services/main/applicationManager.ts | 3 ++- src/services/main/paymentManager.ts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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',