mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-10-01 18:33:41 +02:00
Improves external signer logs
This commit is contained in:
@@ -74,7 +74,7 @@ fun ExternalSignerButton(loginViewModel: LoginViewModel) {
|
|||||||
launcher.launch(ExternalSignerLogin.createIntent(DefaultSignerPermissions))
|
launcher.launch(ExternalSignerLogin.createIntent(DefaultSignerPermissions))
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
if (e is CancellationException) throw e
|
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)
|
loginViewModel.errorManager.error(R.string.error_opening_external_signer)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -22,6 +22,8 @@ package com.vitorpamplona.quartz.nip55AndroidSigner.api.foreground
|
|||||||
|
|
||||||
import android.content.ActivityNotFoundException
|
import android.content.ActivityNotFoundException
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import android.util.Log
|
||||||
|
import android.util.Log.e
|
||||||
import androidx.collection.LruCache
|
import androidx.collection.LruCache
|
||||||
import com.vitorpamplona.quartz.nip55AndroidSigner.api.IResult
|
import com.vitorpamplona.quartz.nip55AndroidSigner.api.IResult
|
||||||
import com.vitorpamplona.quartz.nip55AndroidSigner.api.SignerResult
|
import com.vitorpamplona.quartz.nip55AndroidSigner.api.SignerResult
|
||||||
@@ -119,10 +121,12 @@ class IntentRequestManager(
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
launcher.invoke(requestIntent)
|
launcher.invoke(requestIntent)
|
||||||
} catch (_: ActivityNotFoundException) {
|
} catch (e: ActivityNotFoundException) {
|
||||||
|
Log.e("ExternalSigner", "Error launching intent", e)
|
||||||
awaitingRequests.remove(callId)
|
awaitingRequests.remove(callId)
|
||||||
continuation.resume(activityNotFoundIntent)
|
continuation.resume(activityNotFoundIntent)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
Log.e("ExternalSigner", "Error launching intent", e)
|
||||||
awaitingRequests.remove(callId)
|
awaitingRequests.remove(callId)
|
||||||
continuation.resume(null)
|
continuation.resume(null)
|
||||||
if (e is CancellationException) throw e
|
if (e is CancellationException) throw e
|
||||||
|
Reference in New Issue
Block a user