From 19327b682c1d4d40c1b77d8609c82f9e018a4681 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 18 Jul 2025 17:51:43 -0400 Subject: [PATCH] Improves external signer logs --- .../ui/screen/loggedOff/login/ExternalSignerButton.kt | 2 +- .../api/foreground/IntentRequestManager.kt | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedOff/login/ExternalSignerButton.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedOff/login/ExternalSignerButton.kt index 0cc8ba427..d3b2d274a 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedOff/login/ExternalSignerButton.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedOff/login/ExternalSignerButton.kt @@ -74,7 +74,7 @@ fun ExternalSignerButton(loginViewModel: LoginViewModel) { launcher.launch(ExternalSignerLogin.createIntent(DefaultSignerPermissions)) } catch (e: Exception) { if (e is CancellationException) throw e - Log.e("Signer", "Error opening Signer app", e) + Log.e("ExternalSigner", "Error opening Signer app", e) loginViewModel.errorManager.error(R.string.error_opening_external_signer) } } diff --git a/quartz/src/main/java/com/vitorpamplona/quartz/nip55AndroidSigner/api/foreground/IntentRequestManager.kt b/quartz/src/main/java/com/vitorpamplona/quartz/nip55AndroidSigner/api/foreground/IntentRequestManager.kt index 8b06b2387..d10768450 100644 --- a/quartz/src/main/java/com/vitorpamplona/quartz/nip55AndroidSigner/api/foreground/IntentRequestManager.kt +++ b/quartz/src/main/java/com/vitorpamplona/quartz/nip55AndroidSigner/api/foreground/IntentRequestManager.kt @@ -22,6 +22,8 @@ package com.vitorpamplona.quartz.nip55AndroidSigner.api.foreground import android.content.ActivityNotFoundException import android.content.Intent +import android.util.Log +import android.util.Log.e import androidx.collection.LruCache import com.vitorpamplona.quartz.nip55AndroidSigner.api.IResult import com.vitorpamplona.quartz.nip55AndroidSigner.api.SignerResult @@ -119,10 +121,12 @@ class IntentRequestManager( try { launcher.invoke(requestIntent) - } catch (_: ActivityNotFoundException) { + } catch (e: ActivityNotFoundException) { + Log.e("ExternalSigner", "Error launching intent", e) awaitingRequests.remove(callId) continuation.resume(activityNotFoundIntent) } catch (e: Exception) { + Log.e("ExternalSigner", "Error launching intent", e) awaitingRequests.remove(callId) continuation.resume(null) if (e is CancellationException) throw e