Skip to content

Commit 7b43452

Browse files
committed
feat: check paymentHashOrTxId nullability
1 parent a14fcee commit 7b43452

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/src/main/java/to/bitkit/viewmodels/AppViewModel.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,11 @@ class AppViewModel @Inject constructor(
502502

503503
private fun attachTagsToActivity(paymentHashOrTxId: String?, type: ActivityFilter) {
504504
if (_sendUiState.value.selectedTags.isEmpty()) return
505-
if (paymentHashOrTxId == null) return
505+
506+
if (paymentHashOrTxId == null) {
507+
Logger.error(msg = "null paymentHashOrTxId")
508+
return
509+
}
506510

507511
viewModelScope.launch(Dispatchers.IO) {
508512
val activity = coreService.activity.get(filter = type, txType = PaymentType.SENT, limit = 1u).firstOrNull()

0 commit comments

Comments
 (0)