Skip to content

Fix cost and totals for sponsored transactions.#167

Merged
td202 merged 2 commits into
mainfrom
fix-SPO-104
Jan 29, 2026
Merged

Fix cost and totals for sponsored transactions.#167
td202 merged 2 commits into
mainfrom
fix-SPO-104

Conversation

@td202
Copy link
Copy Markdown
Contributor

@td202 td202 commented Jan 28, 2026

Purpose

Closes SPO-104

Update the cost/subtotal/total calculations for sponsored transactions.

Changes

Displayed cost:

  • is the cost to the sponsor if the account is the sponsor account
  • otherwise, is the cost to the sender if the account is the sender account (may be 0)
  • otherwise, is absent.

Displayed subtotal:

  • if the cost is present (i.e. account is sponsor or sender) and there is a (non-fee) change to the account's balance, this is the change
  • otherwise, is absent.

Displayed total is the total balance change to the account.

Checklist

  • My code follows the style of this project.
  • The code compiles without warnings.
  • I have performed a self-review of the changes.
  • I have documented my code, in particular the intent of the
    hard-to-understand areas.
  • (If necessary) I have updated the CHANGELOG.

@td202 td202 requested review from Radiokot and soerenbf January 28, 2026 16:28
Copy link
Copy Markdown
Contributor

@soerenbf soerenbf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 🙂

@td202 td202 merged commit 3d57c5b into main Jan 29, 2026
2 checks passed
@td202 td202 deleted the fix-SPO-104 branch January 29, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants