-
-
Notifications
You must be signed in to change notification settings - Fork 220
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
fix: Rename enableTxParamsGasFeeUpdates
to isAutomaticGasFeeUpdateEnabled
and also callback
#5602
Conversation
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
* Callback to determine whether gas fee updates should be enabled for a given transaction. | ||
* Returns true to enable updates, false to disable them. | ||
*/ | ||
enableTxParamsGasFeeUpdates?: (transactionMeta: TransactionMeta) => boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor, should we take this chance to rename this to something more standard like isAutomaticGasFeeUpdateEnabled
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
enableTxParamsGasFeeUpdates
to callbackenableTxParamsGasFeeUpdates
to isAutomaticGasFeeUpdateEnabled
and also callback
* main: Fix unmocked block tracker warning in NetworkController tests (#5289) ci: GH action to remind developers to add release notes in CHANGELOG.md (#5620) Release 355.0.0 (#5619) Release 354.0.0 (#5615) fix: Update origin in Snap requests (#5616) Release/353.0.0 (#5612) refactor(accounts-controller): use type-cast instead of `@ts-expect-error` (#5568) feat: support external sign transactions (#5604) feat: extend isAtomicBatchSupported result (#5600) fix: Rename `enableTxParamsGasFeeUpdates` to `isAutomaticGasFeeUpdateEnabled` and also callback (#5602) Release/352.0.0 (#5608) feat: STAKE-1005: refresh staking data when staking txs are confirmed (#5607)
Explanation
This PR aims to rename
enableTxParamsGasFeeUpdates
toisAutomaticGasFeeUpdateEnabled
and make it a callback function instead of a boolean.This callback is invoked before performing
txParams
gas fee updates. The update will proceed only if the callback returns a truthy value.References
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/4595
Mobile update PR: MetaMask/metamask-mobile#14470 (Not updated package yet since major update PR in review MetaMask/metamask-mobile#14326 )
Extension update PR:
Changelog
Checklist