Skip to content

Conversation

@palas
Copy link
Contributor

@palas palas commented Jan 16, 2026

Changelog

- description: |
    Removed requirement of "current treasury value" in transactions
  type:
  - compatible

Context

See #1149

How to trust this PR

Ensure that only the specified restriction was lifted and in the appropriate places. Ensure this is the right thing to do. Confirm I interpreted this message correctly: https://discord.com/channels/1136727663583698984/1239888777015590913/1364244737602879498

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

@palas palas requested a review from Jimbo4350 January 17, 2026 01:12
@palas palas force-pushed the 1149-remove-requirement-of-current-treasury-withdrawal-for-transaction-in-build-raw-command branch from ca753ee to 24d7d28 Compare January 20, 2026 00:07
@palas palas force-pushed the 1149-remove-requirement-of-current-treasury-withdrawal-for-transaction-in-build-raw-command branch from d3f1e86 to edcde6f Compare January 20, 2026 15:19
asum
[ Opt.flag' IncludeCurrentTreasuryValue $
mconcat
[ Opt.long "include-current-treasury-value"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why deviate from the name that build-raw uses?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason I used a different name for the flag is that this one obtains the value from the node, while build-raw takes it from the command line (so it expects a value after the flag). But I don't have a strong opinion about it


-- | Whether to include the current treasury value in the transaction body.
-- If included, the current treasury value will be obtained from the node.
data IncludeCurrentTreasuryValue = IncludeCurrentTreasuryValue | ExcludeCurrentTreasuryValue
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are you introducing this sum type? It's not necessary. What is wrong with (Maybe TxCurrentTreasuryValue)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is different because that command takes the value from the node, not from the command line, so it would be equivalent to Bool.

And the reason I don't use Bool is so that the code is more strongly-typed and self-documenting. Also not a strong opinion

@palas palas requested review from Jimbo4350 and carbolymer January 27, 2026 00:08
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.

Remove requirement of "current treasury value" for transaction in build-raw command

4 participants