Set status OK in the LNURL verify response (#947)

This commit is contained in:
Ross Savage
2025-06-09 12:23:34 +00:00
committed by GitHub
parent e9f3909045
commit 5789089c4e
2 changed files with 6 additions and 1 deletions

View File

@@ -30,10 +30,13 @@ data class LnurlVerifyRequest(
// https://github.com/lnurl/luds/blob/luds/21.md
@Serializable
data class LnurlPayVerifyResponse(
val status: String,
val settled: Boolean,
val preimage: String?,
val pr: String,
)
) {
constructor(settled: Boolean, preimage: String?, pr: String) : this("OK", settled, preimage, pr)
}
class LnurlPayVerifyJob(
private val context: Context,

View File

@@ -7,11 +7,13 @@ struct LnurlVerifyRequest: Codable {
}
struct LnurlVerifyResponse: Decodable, Encodable {
let status: String
let settled: Bool
let preimage: String?
let pr: String
init(settled: Bool, preimage: String?, pr: String) {
self.status = "OK"
self.settled = settled
self.preimage = preimage
self.pr = pr