Skip to content

Commit 87b47a8

Browse files
committed
chore: review & lint
1 parent f3b64a3 commit 87b47a8

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

app/src/main/java/to/bitkit/env/Env.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ internal object Env {
2525

2626
val ldkLogLevel = LogLevel.TRACE
2727

28-
// TODO: remove this to load from BT API instead
2928
val trustedLnPeers
3029
get() = when (network) {
3130
Network.BITCOIN -> listOf(Peers.mainnetLnd1, Peers.mainnetLnd3, Peers.mainnetLnd4)
@@ -191,15 +190,16 @@ internal object Env {
191190
// endregion
192191
}
193192

193+
@Suppress("ConstPropertyName")
194194
object TransactionDefaults {
195195
/** Total recommended tx base fee in sats */
196-
val recommendedBaseFee = 256u
196+
const val recommendedBaseFee = 256u
197197

198198
/**
199199
* Minimum value in sats for an output. Outputs below the dust limit may not be processed because the fees
200200
* required to include them in a block would be greater than the value of the transaction itself.
201201
* */
202-
val dustLimit = 546u
202+
const val dustLimit = 546u
203203
}
204204

205205
object Peers {

app/src/main/java/to/bitkit/repositories/LightningRepo.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ import org.lightningdevkit.ldknode.PaymentDetails
3737
import org.lightningdevkit.ldknode.PaymentId
3838
import org.lightningdevkit.ldknode.PeerDetails
3939
import org.lightningdevkit.ldknode.SpendableUtxo
40-
import org.lightningdevkit.ldknode.TransactionDetails
4140
import org.lightningdevkit.ldknode.Txid
4241
import to.bitkit.data.CacheStore
4342
import to.bitkit.data.SettingsStore
@@ -95,7 +94,7 @@ class LightningRepo @Inject constructor(
9594

9695
private val scope = CoroutineScope(bgDispatcher + SupervisorJob())
9796

98-
private val _eventHandlers = mutableSetOf<NodeEventHandler>()
97+
private val _eventHandlers = ConcurrentHashMap.newKeySet<NodeEventHandler>()
9998
private val _isRecoveryMode = MutableStateFlow(false)
10099
val isRecoveryMode = _isRecoveryMode.asStateFlow()
101100

app/src/main/java/to/bitkit/services/LightningService.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import org.lightningdevkit.ldknode.PaymentDetails
3131
import org.lightningdevkit.ldknode.PaymentId
3232
import org.lightningdevkit.ldknode.PeerDetails
3333
import org.lightningdevkit.ldknode.SpendableUtxo
34-
import org.lightningdevkit.ldknode.TransactionDetails
3534
import org.lightningdevkit.ldknode.Txid
3635
import org.lightningdevkit.ldknode.defaultConfig
3736
import to.bitkit.async.BaseCoroutineScope

app/src/main/java/to/bitkit/ui/screens/settings/LdkDebugScreen.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
3232
import androidx.navigation.NavController
3333
import com.synonym.vssclient.KeyVersion
3434
import to.bitkit.R
35+
import to.bitkit.env.Env
3536
import to.bitkit.models.BackupCategory
3637
import to.bitkit.ui.components.ButtonSize
3738
import to.bitkit.ui.components.PrimaryButton
@@ -148,7 +149,7 @@ private fun LdkDebugContent(
148149
enabled = !uiState.isLoading,
149150
onClick = {
150151
onExportNetworkGraph { file ->
151-
val uri = FileProvider.getUriForFile(context, "${context.packageName}.fileprovider", file)
152+
val uri = FileProvider.getUriForFile(context, Env.FILE_PROVIDER_AUTHORITY, file)
152153
context.shareFile(uri, "text/plain")
153154
}
154155
},

app/src/main/java/to/bitkit/ui/screens/wallets/activity/ActivityDetailScreen.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ import to.bitkit.ui.utils.getScreenTitleRes
8585
import to.bitkit.viewmodels.ActivityDetailViewModel
8686
import to.bitkit.viewmodels.ActivityListViewModel
8787

88+
@Suppress("CyclomaticComplexMethod")
8889
@Composable
8990
fun ActivityDetailScreen(
9091
listViewModel: ActivityListViewModel,

0 commit comments

Comments
 (0)