Improves external signer logs

This commit is contained in:
Vitor Pamplona
2025-07-18 17:51:43 -04:00
parent 85dd9dd5a4
commit 19327b682c
2 changed files with 6 additions and 2 deletions

View File

@@ -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)
}
}

View File

@@ -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