Skip to content

Commit d66d04e

Browse files
committed
chore: context for SendCoinSelectionViewModel logs
1 parent ba68c91 commit d66d04e

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

app/src/main/java/to/bitkit/ui/screens/wallets/send/SendCoinSelectionViewModel.kt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ class SendCoinSelectionViewModel @Inject constructor(
2626
private val lightningRepo: LightningRepo,
2727
private val activityRepo: ActivityRepo,
2828
) : ViewModel() {
29+
companion object {
30+
private const val TAG = "SendCoinSelectionViewModel"
31+
}
2932

3033
private val _uiState = MutableStateFlow(CoinSelectionUiState())
3134
val uiState = _uiState.asStateFlow()
@@ -63,7 +66,7 @@ class SendCoinSelectionViewModel @Inject constructor(
6366
)
6467
}
6568
}.onFailure {
66-
Logger.error("Failed to load UTXOs for coin selection", it)
69+
Logger.error("Failed to load UTXOs for coin selection", it, context = TAG)
6770
ToastEventBus.send(Exception("Failed to load UTXOs: ${it.message}"))
6871
}
6972
}
@@ -82,8 +85,8 @@ class SendCoinSelectionViewModel @Inject constructor(
8285
_tagsByTxId.update { currentMap -> currentMap + (txId to tags) }
8386
}
8487
}
85-
.onFailure { e ->
86-
Logger.error("Failed to load tags for utxo $txId", e)
88+
.onFailure {
89+
Logger.error("Failed to load tags for utxo $txId", it, context = TAG)
8790
}
8891
}
8992
}

0 commit comments

Comments
 (0)