From ddba4ac5100691244f96aaac7798061580a87f55 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Thu, 27 Apr 2023 17:35:36 -0400 Subject: [PATCH] Add logs for fail to decrypt zap --- .../main/java/com/vitorpamplona/amethyst/model/Account.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/model/Account.kt b/app/src/main/java/com/vitorpamplona/amethyst/model/Account.kt index 2a1cfc26f..2a0a11662 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/model/Account.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/model/Account.kt @@ -1,6 +1,7 @@ package com.vitorpamplona.amethyst.model import android.content.res.Resources +import android.util.Log import androidx.core.os.ConfigurationCompat import androidx.lifecycle.LiveData import com.vitorpamplona.amethyst.service.FileHeader @@ -779,7 +780,11 @@ class Account( } if (altPrivateKeyToUse != null && altPubkeyToUse != null) { - LnZapRequestEvent.checkForPrivateZap(event, altPrivateKeyToUse, altPubkeyToUse) + val result = LnZapRequestEvent.checkForPrivateZap(event, altPrivateKeyToUse, altPubkeyToUse) + if (result == null) { + Log.w("Private ZAP Decrypt", "Fail to decrypt Zap from ${note.author?.toBestDisplayName()} ${note.idNote()}") + } + result } else { null }