log lnurl pay link

This commit is contained in:
boufni95 2024-02-21 19:22:24 +01:00
parent bf56f8ba69
commit cb28b3b8ab

View file

@ -281,10 +281,13 @@ export default class {
}
async GetLnurlPayLink(ctx: Types.UserContext): Promise<Types.LnurlLinkResponse> {
getLogger({})("getting lnurl pay link")
const app = await this.storage.applicationStorage.GetApplication(ctx.app_id)
const key = await this.storage.paymentStorage.AddUserEphemeralKey(ctx.user_id, 'pay', app)
const lnurl = this.encodeLnurl(this.lnurlPayUrl(key.key))
getLogger({})("got lnurl pay link: ", lnurl)
return {
lnurl: this.encodeLnurl(this.lnurlPayUrl(key.key)),
lnurl,
k1: key.key
}
}