Use zap comment for description/memo
Some checks failed
continuous-integration/drone/push Build is failing
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:
parent
49d24990b4
commit
c0f4e7925e
@ -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),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user