mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2024-09-29 16:30:49 +00:00
do not try decrypt private zaps for now
This commit is contained in:
parent
780832d785
commit
de5c0d4681
@ -2594,23 +2594,25 @@ class Account(
|
|||||||
val loggedInPrivateKey = keyPair.privKey
|
val loggedInPrivateKey = keyPair.privKey
|
||||||
|
|
||||||
if (loginWithAmber && event is LnZapRequestEvent && event.isPrivateZap()) {
|
if (loginWithAmber && event is LnZapRequestEvent && event.isPrivateZap()) {
|
||||||
val decryptedContent = AmberUtils.cachedDecryptedContent[event.id]
|
// never decrypt zaps for now, it keeps opening amber for very private zap event
|
||||||
if (decryptedContent != null) {
|
return null
|
||||||
return try {
|
// val decryptedContent = AmberUtils.cachedDecryptedContent[event.id]
|
||||||
Event.fromJson(decryptedContent)
|
// if (decryptedContent != null) {
|
||||||
} catch (e: Exception) {
|
// return try {
|
||||||
null
|
// Event.fromJson(decryptedContent)
|
||||||
}
|
// } catch (e: Exception) {
|
||||||
}
|
// null
|
||||||
AmberUtils.decryptZapEvent(event)
|
// }
|
||||||
if (AmberUtils.content.isBlank()) return null
|
// }
|
||||||
if (AmberUtils.content == "Could not decrypt the message") return null
|
// AmberUtils.decryptZapEvent(event)
|
||||||
AmberUtils.cachedDecryptedContent[event.id] = AmberUtils.content
|
// if (AmberUtils.content.isBlank()) return null
|
||||||
return try {
|
// if (AmberUtils.content == "Could not decrypt the message") return null
|
||||||
Event.fromJson(AmberUtils.content)
|
// AmberUtils.cachedDecryptedContent[event.id] = AmberUtils.content
|
||||||
} catch (e: Exception) {
|
// return try {
|
||||||
null
|
// Event.fromJson(AmberUtils.content)
|
||||||
}
|
// } catch (e: Exception) {
|
||||||
|
// null
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
return if (event is LnZapRequestEvent && loggedInPrivateKey != null && event.isPrivateZap()) {
|
return if (event is LnZapRequestEvent && loggedInPrivateKey != null && event.isPrivateZap()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user