From 38023dac45ade79beb7faebf783fe085652ea2bc Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 11 Jun 2026 20:10:20 +0000 Subject: [PATCH] fix: resolve iOS test-name compile error and LocalContext lint error - Rename Nip05Test backticked test name to drop parentheses, which are illegal identifier characters on Kotlin/Native (iosSimulatorArm64). - Resolve CLINK budget toast strings at composition time via stringRes instead of context.getString inside the async callback, fixing the LocalContextGetResourceValueCall lint errors in WalletScreen. https://claude.ai/code/session_01UgP8ErzBbQYkTDtkJx5nrt --- .../amethyst/ui/screen/loggedIn/wallet/WalletScreen.kt | 6 ++++-- .../vitorpamplona/quartz/nip05DnsIdentifiers/Nip05Test.kt | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/wallet/WalletScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/wallet/WalletScreen.kt index 2f99a9c5b9..4d5db6d518 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/wallet/WalletScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/wallet/WalletScreen.kt @@ -218,6 +218,8 @@ private fun MultiWalletHomeContent( ) { val walletInfoList by walletViewModel.walletInfoList.collectAsState() val context = LocalContext.current + val budgetApprovedMsg = stringRes(R.string.clink_budget_approved) + val debitNoResponseMsg = stringRes(R.string.clink_debit_no_response) LaunchedEffect(Unit) { walletViewModel.fetchAllBalances() @@ -261,9 +263,9 @@ private fun MultiWalletHomeContent( val error = response?.failureDetail() val msg = when { - response?.isOk() == true -> context.getString(R.string.clink_budget_approved) + response?.isOk() == true -> budgetApprovedMsg !error.isNullOrBlank() -> error - else -> context.getString(R.string.clink_debit_no_response) + else -> debitNoResponseMsg } Toast.makeText(context, msg, Toast.LENGTH_LONG).show() } diff --git a/quartz/src/commonTest/kotlin/com/vitorpamplona/quartz/nip05DnsIdentifiers/Nip05Test.kt b/quartz/src/commonTest/kotlin/com/vitorpamplona/quartz/nip05DnsIdentifiers/Nip05Test.kt index fac6835a5e..0dadfcdf1f 100644 --- a/quartz/src/commonTest/kotlin/com/vitorpamplona/quartz/nip05DnsIdentifiers/Nip05Test.kt +++ b/quartz/src/commonTest/kotlin/com/vitorpamplona/quartz/nip05DnsIdentifiers/Nip05Test.kt @@ -56,7 +56,7 @@ class Nip05Test { } @Test - fun `parse clink_offer as a flat top-level string (bridgelet shape)`() = + fun `parse clink_offer as a flat top-level bridgelet-shaped string`() = runTest { val noffer = "noffer1qqsexampleclinkoffer" val json = """{ "names": { "bob": "abc" }, "clink_offer": "$noffer" }"""