Skip to content

Conversation

@ovitrif
Copy link
Collaborator

@ovitrif ovitrif commented Jan 9, 2026

This PR:

  1. Localizes remaining hardcoded strings
  2. Adds dynamic boost fee time estimates for transaction acceleration
  3. Implements weather widget API response caching
  4. Fixes WalletRepo state management by replacing uiState with individual repo states
  5. Cleans up deprecated code, warnings, and TODOs across the codebase

Description

The PR addresses multiple code quality improvements and new features:

Localization

  • Localize NodeLifecycleState strings for proper i18n support
  • Localize remaining hardcoded strings throughout the app
  • Add 50+ new string resources in alphabetical order

Features

  • Dynamic boost fee time estimates that show confirmation time based on fee rate
  • Weather widget API caching to reduce network calls

Refactoring

  • Convert NotificationUtils functions to extension functions
  • Fix WalletRepo by replacing combined uiState with separate repository state flows
  • Simplify LightningService by removing redundant state management

Cleanup

  • Remove deprecated LdkMigrationTest.kt
  • Remove completed TODOs and fix remaining ones
  • Update AGP, add compose-stability-analyzer dependency
  • Fix various lint warnings and code style issues
  • Update README and documentation

Preview

N/A - Primarily code quality and localization changes

QA Notes

1. Localization

  • Change device language to a non-English locale
  • Verify node status messages display correctly in Settings → Lightning Connections
  • Check notification strings are properly localized

2. Boost Fee Estimates

  • Open a pending on-chain transaction
  • Tap boost/accelerate
  • Verify fee slider shows dynamic time estimates (e.g., "~10 min", "~30 min")

3. Weather Widget

  • Enable weather widget
  • Observe API calls are cached (check logs)
  • Widget should update without excessive network requests

4. Regression Testing

  • Verify wallet balance displays correctly
  • Test sending and receiving Lightning payments
  • Confirm background notifications work as expected

val network = Network.valueOf(BuildConfig.NETWORK)
val locales = BuildConfig.LOCALES.split(",")
val walletSyncIntervalSecs = 10_uL // TODO review
val walletSyncIntervalSecs = 10_uL

Check warning

Code scanning / detekt

Usage of `vals` that can be `const val` detected. Warning

walletSyncIntervalSecs can be a const val.
Network.TESTNET -> ElectrumServers.TESTNET
Network.BITCOIN -> ElectrumServers.BITCOIN
else -> TODO("${network.name} network not implemented")
else -> throw Error("${network.name} network not implemented")

Check warning

Code scanning / detekt

The thrown exception is too generic. Prefer throwing project specific exceptions to handle error cases. Warning

Error is a too generic Exception. Prefer throwing specific exceptions that indicate a specific error case.
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.runtime.Composable
import androidx.compose.runtime.Stable

Check warning

Code scanning / detekt

Detects unused imports Warning

Unused import
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.PathEffect
import androidx.compose.ui.res.stringResource

Check warning

Code scanning / detekt

Detects unused imports Warning

Unused import
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import to.bitkit.R

Check warning

Code scanning / detekt

Detects unused imports Warning

Unused import
@ovitrif ovitrif self-assigned this Jan 9, 2026
@ovitrif ovitrif changed the title chore: fix warnings and cleanup codebase chore: fix all warnings and cleanup codebase Jan 9, 2026
@ovitrif ovitrif changed the title chore: fix all warnings and cleanup codebase chore: fix all warnings and code cleanup Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants