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 3 times, most recently from f1a2a94 to 82e2f32 Compare November 11, 2025 16:37
polymath-eric
polymath-eric previously approved these changes Nov 19, 2025
@sonarqubecloud
Copy link

@sansan
Copy link
Contributor Author

sansan commented Nov 20, 2025

/fast-forward

@polymesh-bot
Copy link

Triggered from #1568 (comment) by @​sansan.

Trying to fast forward develop (84821b2) to feat/DA-1558 (b93fd0c).

Target branch (develop):

commit 84821b22094c76a67ebe99561627048de3aaa22e (HEAD -> develop, tag: v29.1.0-beta.12, origin/develop)
Author: Toms <[email protected]>
Date:   Wed Nov 19 09:32:25 2025 +0200

    fix: 🐛 get all exemptions

Pull request (feat/DA-1558):

commit b93fd0cb9640b8bf60b8c41a4ec74eb40744a450 (pull_request/feat/DA-1558)
Author: Toms <[email protected]>
Date:   Tue Nov 11 15:44:39 2025 +0200

    feat: 🎸 create asProposal methods

Fast forwarding develop (84821b2) to feat/DA-1558 (b93fd0c).

$ git push origin b93fd0cb9640b8bf60b8c41a4ec74eb40744a450:develop
remote: error: GH006: Protected branch update failed for refs/heads/develop.        
remote: 
remote: - Waiting on code owner review from PolymeshAssociation/middleware.        
To https://github.com/PolymeshAssociation/polymesh-sdk.git
 ! [remote rejected]   b93fd0cb9640b8bf60b8c41a4ec74eb40744a450 -> develop (protected branch hook declined)
error: failed to push some refs to 'https://github.com/PolymeshAssociation/polymesh-sdk.git'

@sansan sansan requested a review from polymath-eric November 20, 2025 11:24
@polymath-eric
Copy link
Contributor

/fast-forward

@polymesh-bot polymesh-bot merged commit b93fd0c into develop Nov 20, 2025
16 of 17 checks passed
@polymesh-bot polymesh-bot deleted the feat/DA-1558 branch November 20, 2025 18:02
@polymesh-bot
Copy link

🎉 This PR is included in version 29.1.0-beta.13 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants