Skip to content

Commit c2b1a0b

Browse files
committed
feat: compare txId
1 parent a597e2a commit c2b1a0b

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -520,10 +520,16 @@ class AppViewModel @Inject constructor(
520520
tags = _sendUiState.value.selectedTags
521521
)
522522

523-
is Activity.Onchain -> coreService.activity.appendTags(
524-
toActivityId = activity.v1.id,
525-
tags = _sendUiState.value.selectedTags
526-
)
523+
is Activity.Onchain -> {
524+
if (paymentHashOrTxId == activity.v1.txId) {
525+
coreService.activity.appendTags(
526+
toActivityId = activity.v1.id,
527+
tags = _sendUiState.value.selectedTags
528+
)
529+
} else {
530+
Logger.error("Different tcId. Expected: $paymentHashOrTxId found: ${activity.v1.id}")
531+
}
532+
}
527533
}
528534
}
529535
}

0 commit comments

Comments
 (0)