Skip to content

Conversation

@sansan
Copy link
Contributor

@sansan sansan commented Nov 11, 2025

Description

Adds an optional asProposal parameter (default: true) to getTotalFees() and toSignablePayload() methods, allowing flexibility to handle MultiSig transactions as direct transactions rather than proposals.

  • PolymeshTransactionBase.getTotalFees(asProposal = true)

    • When asProposal: false, uses the signing account directly for fee calculation (ignores MultiSig payer)
    • When asProposal: true (default), maintains existing behavior (uses MultiSig payer if available)
  • PolymeshTransactionBase.toSignablePayload(metadata, asProposal = true)

    • When asProposal: false, returns payload with multiSig: null and unwrapped transaction
    • When asProposal: true (default), maintains existing behavior (includes MultiSig address and wraps as proposal)
  • New helper methods:

    • composeTxForFees(asProposal: boolean) - Conditionally wraps transaction based on asProposal flag
    • getBaseTransaction() - Abstract method to get unwrapped transaction (implemented in PolymeshTransaction and PolymeshTransactionBatch)
  • Updated getPayingAccount(asProposal = true)

    • Only uses MultiSig payer logic when asProposal: true
    • Falls back gracefully when MultiSig payer's primary account has no identity

JIRA Link

https://polymesh.atlassian.net/browse/DA-1558

@sansan sansan requested a review from a team as a code owner November 11, 2025 13:47
@sansan sansan force-pushed the feat/DA-1558 branch 2 times, most recently from 318059f to f1a2a94 Compare November 11, 2025 15:29
@sonarqubecloud
Copy link

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.

2 participants