mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-09 16:14:40 +00:00
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
This commit is contained in:
+4
-2
@@ -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()
|
||||
}
|
||||
|
||||
+1
-1
@@ -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" }"""
|
||||
|
||||
Reference in New Issue
Block a user