Skip to content

Add gasFeeEstimates for batch transactions #5886

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 58 commits into from
Jun 11, 2025

Conversation

vinistevam
Copy link
Contributor

@vinistevam vinistevam commented May 30, 2025

Explanation

This PR enhances TransactionBatchMeta by adding support for gasFeeEstimates and status.
When both useHook and requireApproval are true, the batch approval flow is triggered, and gasFeeEstimates are populated using the DefaultGasFeeFlow. These estimates are then passed along with the request to be consumed by the client.

Changes

  • Extended TransactionBatchMeta to include:
    • gasFeeEstimates
    • status
  • Introduced a new helper function: prepareApprovalData
    • Responsible for preparing approval data before creating the request

References

Changelog

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

vinistevam and others added 30 commits May 13, 2025 17:18
…:MetaMask/core into feat/add-batch-transaction-approval-type
@vinistevam vinistevam requested a review from matthewwalsh0 June 6, 2025 07:53
OGPoyraz
OGPoyraz previously approved these changes Jun 6, 2025
OGPoyraz
OGPoyraz previously approved these changes Jun 9, 2025
OGPoyraz
OGPoyraz previously approved these changes Jun 11, 2025
@vinistevam vinistevam dismissed stale reviews from OGPoyraz and pedronfigueiredo via 9204df6 June 11, 2025 13:05
@vinistevam vinistevam dismissed matthewwalsh0’s stale review June 11, 2025 13:25

Applied all suggestions.

@vinistevam vinistevam merged commit 83a199e into main Jun 11, 2025
218 checks passed
@vinistevam vinistevam deleted the feat/add-estimate-gas-fee-batch-tx branch June 11, 2025 13:25
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