Use zap comment for description/memo
Some checks failed
continuous-integration/drone/push Build is failing

But use the hashed zap request event for the description hash.
This commit is contained in:
Râu Cao 2024-05-04 17:07:23 +02:00
parent 49d24990b4
commit c0f4e7925e
Signed by: raucao
GPG Key ID: 37036C356E56CC51

View File

@ -131,10 +131,13 @@ class LnurlpayController < ApplicationController
return return
end end
desc = "Zap for #{@user.address}"
desc = "#{desc}: \"#{event.content}\"" if event.content.present?
invoice = LndhubManager::CreateUserInvoice.call( invoice = LndhubManager::CreateUserInvoice.call(
user: @user, payload: { user: @user, payload: {
amount: amount, # sats amount: amount, # sats
description: event.to_json, description: desc,
description_hash: Digest::SHA256.hexdigest(event.to_json), description_hash: Digest::SHA256.hexdigest(event.to_json),
} }
) )