You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extends GasFeePoller to update gas properties for unapproved transaction batches (#5950)
## Explanation
<!--
Thanks for your contribution! Take a moment to answer these questions so
that reviewers have the information they need to properly understand
your changes:
* What is the current state of things and why does it need to change?
* What is the solution your changes offer and how does it work?
* Are there any changes whose purpose might not obvious to those
unfamiliar with the domain?
* If your primary goal was to update one package but you found you had
to update another one along the way, why did you do so?
* If you had to upgrade a dependency, why did you do so?
-->
<!--
Are there any issues that this pull request is tied to?
Are there other links that reviewers should consult to understand these
changes better?
Are there client or consumer pull requests to adopt any breaking
changes?
For example:
* Fixes #12345
* Related to #67890
-->
This PR extends the `GasFeePoller` to track/update gas properties for
unapproved `transactionBatches`.
## Changes
The GasFeePoller now:
- Detects unapproved `transactionBatches` via
`#getUnapprovedTransactionBatches`.
- Fetches gas estimates using `DefaultGasFeeFlow`.
- Emits `transaction-batch-updated` events with updated
`gasFeeEstimates`.
Updates are applied to the `TransactionBatchMeta` for each batch,
mirroring the behaviour already in place for single transactions.
This enhancement ensures that unapproved transaction batches receive
timely gas updates similar to individual transactions, improving
consistency across transaction types.
## References
FixesMetaMask/MetaMask-planning#5090
## Changelog
<!--
THIS SECTION IS NO LONGER NEEDED.
The process for updating changelogs has changed. Please consult the
"Updating changelogs" section of the Contributing doc for more.
-->
## Checklist
- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs),
highlighting breaking changes as necessary
- [ ] I've prepared draft pull requests for clients and consumer
packages to resolve any breaking changes
---------
Co-authored-by: Pedro Figueiredo <[email protected]>
Co-authored-by: Matthew Walsh <[email protected]>
Co-authored-by: OGPoyraz <[email protected]>
Copy file name to clipboardExpand all lines: packages/transaction-controller/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
18
18
- Query only latest page of transactions from accounts API ([#5983](https://github.com/MetaMask/core/pull/5983))
19
19
- Remove incoming transactions when calling `wipeTransactions` ([#5986](https://github.com/MetaMask/core/pull/5986))
20
20
- Poll immediately when calling `startIncomingTransactionPolling` ([#5986](https://github.com/MetaMask/core/pull/5986))
21
+
- Extend `GasFeePoller` to support gas updates for unapproved `transactionBatches`, emitting `transaction-batch-updated` with `gasFeeEstimates`. ([#5950](https://github.com/MetaMask/core/pull/5950))
0 commit comments