account for on chain note in messages
What changed, and why it matters
This commit fixes a small logic bug in how Stack Wallet displays the status of certain transactions. Previously, the app did not count an optional on-chain note as one of the messages, so it could show the wrong status label (for example, saying it is still waiting for the sender when it should already be waiting for confirmations). There is no sign this can be used to steal funds or attack users; it is mainly a user-interface correctness fix.
Treat as a routine bug-fix commit. No immediate security response is needed. If reviewing further, verify that the bitwise OR (`|`) was intentional and consider replacing with logical OR (`||`) for clarity.
Security signals we found
UI status label logic correction
No input validation, cryptography, or network parsing changes observed
No memory safety, authentication, or authorization changes observed
Evidence from the diff
In transaction_v2.dart, the status text logic for unconfirmed receive/send transactions now treats an onChainNote as an additional message. The condition changes from numberOfMessages == 1 to (onChainNote == null && numberOfMessages == 1) | (onChainNote != null && numberOfMessages == 2). Notably the patch uses the bitwise OR operator | instead of the logical ||; in this boolean context the result is equivalent, but it is a minor code-style issue. The change only affects displayed status strings, not transaction validation or cryptographic handling.
Changed components
lib/models/isar/models/blockchain_data/v2/transaction_v2.dartInspect captured patch +4 / −2
diff --git a/lib/models/isar/models/blockchain_data/v2/transaction_v2.dart b/lib/models/isar/models/blockchain_data/v2/transaction_v2.dart
index 4bb9e1f..927c1fa 100644
--- a/lib/models/isar/models/blockchain_data/v2/transaction_v2.dart
+++ b/lib/models/isar/models/blockchain_data/v2/transaction_v2.dart
@@ -311,7 +311,8 @@ class TransactionV2 {
if (isConfirmed(currentChainHeight, minConfirms, minCoinbaseConfirms)) {
return "Received";
} else {
- if (numberOfMessages == 1) {
+ if ((onChainNote == null && numberOfMessages == 1) |
+ (onChainNote != null && numberOfMessages == 2)) {
return "Receiving (waiting for sender)";
} else if ((numberOfMessages ?? 0) > 1) {
return "Receiving (waiting for confirmations)"; // TODO test if the sender still has to open again after the receiver has 2 messages present, ie. sender->receiver->sender->node (yes) vs. sender->receiver->node (no)
@@ -323,7 +324,8 @@ class TransactionV2 {
if (isConfirmed(currentChainHeight, minConfirms, minCoinbaseConfirms)) {
return "Sent (confirmed)";
} else {
- if (numberOfMessages == 1) {
+ if ((onChainNote == null && numberOfMessages == 1) |
+ (onChainNote != null && numberOfMessages == 2)) {
return "Sending (waiting for receiver)";
} else if ((numberOfMessages ?? 0) > 1) {
return "Sending (waiting for confirmations)";
Why this scored 17/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.