fix(history): count shielding txs in the Sent card to match the Sent filter
The Sent summary card showed 0 while selecting the Sent filter listed transactions. The card counted only plain "send" rows and deliberately excluded both legs of an autoshield pair as an "internal move", but the list shows the merged "shield" row under the Sent filter. With only shielding transactions and no plain sends, the card read 0 against a non-empty Sent list. Count each shield pair toward the Sent card (with the shielded receive-leg amount, which is what the merged row displays), so the card and the filter agree. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -172,7 +172,15 @@ void RenderTransactionsTab(App* app)
|
||||
else if (stx.type == "receive" && recv_i < 0 &&
|
||||
!stx.address.empty() && stx.address[0] == 'z') recv_i = (int)si;
|
||||
}
|
||||
if (send_i >= 0 && recv_i >= 0) { isShieldLeg[send_i] = true; isShieldLeg[recv_i] = true; }
|
||||
if (send_i >= 0 && recv_i >= 0) {
|
||||
isShieldLeg[send_i] = true;
|
||||
isShieldLeg[recv_i] = true;
|
||||
// The list shows the merged shield under the "Sent" filter, so count it there too —
|
||||
// otherwise the Sent card reads 0 while the Sent list is non-empty. Use the shielded
|
||||
// (receive-leg) amount, which is what the merged row displays.
|
||||
sendCount++;
|
||||
sendTotal += std::abs(state.transactions[recv_i].amount);
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < state.transactions.size(); i++) {
|
||||
|
||||
Reference in New Issue
Block a user