Skip to content

Activity amounts: fix sent transaction sign display #90

Description

@johnny9

Code Gap

Sent transaction rows can be displayed with the wrong sign. Transaction::fromWalletTx() stores sent debits as negative values, while Transaction::prettyAmount() computes credit - debit. That can make sent Activity rows appear positive, while CSV export uses credit + debit and can disagree with the visible list.

Work Needed

  • Settle the Activity transaction amount sign convention for sent, received, self-transfer, generated, conflicted, and abandoned rows.
  • Fix the visible amount formatting so sent transactions display as outgoing amounts.
  • Keep CSV export and detail-page amounts consistent with the visible row.
  • Add unit coverage for Transaction::prettyAmount() and ActivityListModel::NetAmountSatRole using sent and received transactions.
  • Add GUI coverage for at least one sent row amount.

Priority

Preview / P1 correctness bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingv1.0Required or tracked for v1.0 releasewallet

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions