Skip to content

fix: disclose WitnessCreateContract 9,999 TRX burn fee (WPN-1719) - #73

Open
ulissesferreira wants to merge 7 commits into
mainfrom
WPN-1719-witness-create-fee
Open

fix: disclose WitnessCreateContract 9,999 TRX burn fee (WPN-1719)#73
ulissesferreira wants to merge 7 commits into
mainfrom
WPN-1719-witness-create-fee

Conversation

@ulissesferreira

Copy link
Copy Markdown
Contributor

Summary

  • Migrates MetaMask/snap-tron-wallet#382 into @metamask/tron-wallet-snap.
  • Includes getAccountUpgradeCost in fee calculation for WitnessCreateContract so Network fee and insufficient-balance checks reflect the irreversible 9,999 TRX burn.
  • Replaces the generic "Unsupported contract for simulation" confirmation copy with Super Representative candidate disclosure for this contract type.

References

Test plan

  • yarn workspace @metamask/tron-wallet-snap run test
  • Confirm a WitnessCreateContract signing flow shows the 9,999 TRX burn disclosure instead of unsupported-simulation copy
  • Confirm Network fee / insufficient-balance checks include the account-upgrade cost

@ulissesferreira
ulissesferreira requested a review from a team as a code owner July 30, 2026 15:16
ulissesferreira added a commit that referenced this pull request Jul 30, 2026
@ulissesferreira
ulissesferreira requested a review from a team as a code owner July 31, 2026 07:13
@ulissesferreira

Copy link
Copy Markdown
Contributor Author

@metamaskbot publish-preview

@github-actions

Copy link
Copy Markdown
Contributor

Preview builds have been published. Learn how to use preview builds in other projects.

Expand for full list of packages and versions.
@metamask-previews/bitcoin-wallet-snap@1.15.2-preview-7d4d14cb
@metamask-previews/tron-wallet-snap@1.33.1-preview-7d4d14cb

@ulissesferreira

Copy link
Copy Markdown
Contributor Author

Draft PR for testing: MetaMask/metamask-extension#45074

Include getAccountUpgradeCost in fee calculation for WitnessCreateContract
so Network fee and insufficient-balance checks reflect the irreversible
protocol burn. Replace the generic unsupported-simulation copy with Super
Representative candidate disclosure on confirmation.

Fixes WPN-1719
@cursor
cursor Bot force-pushed the WPN-1719-witness-create-fee branch from 7d4d14c to 713a85d Compare July 31, 2026 12:26
cursoragent and others added 2 commits July 31, 2026 12:53
Replace explicit any types in FeeCalculatorService tests with the
Transaction type from tronweb. Revert coverage thresholds to main
values since the bumped thresholds are not met. Sync snap.manifest
shasum to the value produced by CI production builds.

Co-authored-by: Ulisses Ferreira <ulisses@hey.com>
@MetaMask MetaMask deleted a comment from cursor Bot Jul 31, 2026
@MetaMask MetaMask deleted a comment from cursor Bot Jul 31, 2026
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