mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-06-28 18:31:01 +02:00
Update LnZapRequestEvent.kt
This commit is contained in:
parent
bd64a7de63
commit
9ae13a9f97
@ -88,13 +88,13 @@ class LnZapRequestEvent(
|
|||||||
pubKey = Utils.pubkeyCreate(privkey).toHexKey()
|
pubKey = Utils.pubkeyCreate(privkey).toHexKey()
|
||||||
tags = tags + listOf(listOf("anon", ""))
|
tags = tags + listOf(listOf("anon", ""))
|
||||||
} else if (zapType == LnZapEvent.ZapType.PRIVATE) {
|
} else if (zapType == LnZapEvent.ZapType.PRIVATE) {
|
||||||
var enc_prkey = createEncryptionPrivateKey(privateKey.toHexKey(), userHex, createdAt)
|
var encryptionPrivateKey = createEncryptionPrivateKey(privateKey.toHexKey(), userHex, createdAt)
|
||||||
var noteJson = (create(privkey, 9733, listOf(tags[0], tags[1]), message)).toJson()
|
var noteJson = (create(privkey, 9733, listOf(tags[0], tags[1]), message)).toJson()
|
||||||
var privreq = encryptPrivateZapMessage(noteJson, enc_prkey, userHex.toByteArray())
|
var encryptedContent = encryptPrivateZapMessage(noteJson, encryptionPrivateKey, userHex.toByteArray())
|
||||||
tags = tags + listOf(listOf("anon", privreq))
|
tags = tags + listOf(listOf("anon", encryptedContent))
|
||||||
content = ""
|
content = ""
|
||||||
privkey = enc_prkey
|
privkey = encryptionPrivateKey
|
||||||
pubKey = Utils.pubkeyCreate(enc_prkey).toHexKey()
|
pubKey = Utils.pubkeyCreate(encryptionPrivateKey).toHexKey()
|
||||||
}
|
}
|
||||||
val id = generateId(pubKey, createdAt, kind, tags, content)
|
val id = generateId(pubKey, createdAt, kind, tags, content)
|
||||||
val sig = Utils.sign(id, privkey)
|
val sig = Utils.sign(id, privkey)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user