mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-05 19:28:25 +00:00
style(desktop): import CancellationException instead of inlining its name
The vault bootstrap added two more inline kotlin.coroutines.cancellation.CancellationException references next to two existing ones; CLAUDE.md forbids fully-qualified names in function bodies. One import, no behaviour change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WHCtgMDNkAHvRDXnthuXQc
This commit is contained in:
co-authored by
Claude Opus 5
parent
81b9ba853a
commit
94a229e983
+5
-4
@@ -70,6 +70,7 @@ import kotlinx.coroutines.sync.Mutex
|
||||
import kotlinx.coroutines.sync.withLock
|
||||
import kotlinx.coroutines.withTimeout
|
||||
import java.io.File
|
||||
import kotlin.coroutines.cancellation.CancellationException
|
||||
|
||||
sealed class AccountState {
|
||||
data object Loading : AccountState()
|
||||
@@ -279,7 +280,7 @@ class AccountManager internal constructor(
|
||||
vaultMetadataKeyMigrated = true
|
||||
try {
|
||||
secureStorage.enableConsolidatedVault(listOf(DesktopAccountStorage.METADATA_KEY_ALIAS))
|
||||
} catch (e: kotlin.coroutines.cancellation.CancellationException) {
|
||||
} catch (e: CancellationException) {
|
||||
throw e
|
||||
} catch (e: Exception) {
|
||||
Log.w("AccountManager", "Consolidated keychain vault phase 1 failed; continuing on legacy per-alias reads", e)
|
||||
@@ -325,7 +326,7 @@ class AccountManager internal constructor(
|
||||
aliases += nwcKeyAlias(npub)
|
||||
}
|
||||
secureStorage.enableConsolidatedVault(aliases)
|
||||
} catch (e: kotlin.coroutines.cancellation.CancellationException) {
|
||||
} catch (e: CancellationException) {
|
||||
throw e
|
||||
} catch (e: Exception) {
|
||||
// Non-fatal: SecureKeyStorage falls back to legacy per-alias reads for
|
||||
@@ -362,7 +363,7 @@ class AccountManager internal constructor(
|
||||
is SignerType.Remote -> loadBunkerAccount((info.signerType as SignerType.Remote).bunkerUri, activeNpub)
|
||||
is SignerType.ViewOnly -> loadReadOnlyAccount(activeNpub)
|
||||
}
|
||||
} catch (e: kotlin.coroutines.cancellation.CancellationException) {
|
||||
} catch (e: CancellationException) {
|
||||
throw e
|
||||
} catch (e: Exception) {
|
||||
Result.failure(e)
|
||||
@@ -1009,7 +1010,7 @@ class AccountManager internal constructor(
|
||||
|
||||
_nwcConnection.value = parsed
|
||||
Result.success(parsed)
|
||||
} catch (e: kotlin.coroutines.cancellation.CancellationException) {
|
||||
} catch (e: CancellationException) {
|
||||
throw e
|
||||
} catch (e: Exception) {
|
||||
Result.failure(e)
|
||||
|
||||
Reference in New Issue
Block a user