@metamask-previews/transaction-controller 53.0.0-preview-7f6d1f4 → 53.0.0-preview-c7dcfd5a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/dist/TransactionController.cjs +3 -2
- package/dist/TransactionController.cjs.map +1 -1
- package/dist/TransactionController.d.cts +5 -2
- package/dist/TransactionController.d.cts.map +1 -1
- package/dist/TransactionController.d.mts +5 -2
- package/dist/TransactionController.d.mts.map +1 -1
- package/dist/TransactionController.mjs +3 -2
- package/dist/TransactionController.mjs.map +1 -1
- package/dist/helpers/GasFeePoller.cjs +2 -1
- package/dist/helpers/GasFeePoller.cjs.map +1 -1
- package/dist/helpers/GasFeePoller.d.cts +1 -1
- package/dist/helpers/GasFeePoller.d.cts.map +1 -1
- package/dist/helpers/GasFeePoller.d.mts +1 -1
- package/dist/helpers/GasFeePoller.d.mts.map +1 -1
- package/dist/helpers/GasFeePoller.mjs +2 -1
- package/dist/helpers/GasFeePoller.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -21,6 +21,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
21
21
|
- Replace `address` argument with `request` object containing `address` and optional `chainIds`.
|
|
22
22
|
- Return array of `IsAtomicBatchSupportedResultEntry` objects.
|
|
23
23
|
- Skip `origin` validation for `batch` transaction type ([#5586](https://github.com/MetaMask/core/pull/5586))
|
|
24
|
+
- **BREAKING:** `enableTxParamsGasFeeUpdates` is renamed to `isAutomaticGasFeeUpdateEnabled` now expects a callback function instead of a boolean.
|
|
25
|
+
- This callback is invoked before performing `txParams` gas fee updates. The update will proceed only if the callback returns a truthy value.
|
|
26
|
+
- If not set it will default to return `false`.
|
|
24
27
|
|
|
25
28
|
## [53.0.0]
|
|
26
29
|
|
|
@@ -157,7 +157,7 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
157
157
|
* @param options - The controller options.
|
|
158
158
|
*/
|
|
159
159
|
constructor(options) {
|
|
160
|
-
const { disableHistory, disableSendFlowHistory, disableSwaps,
|
|
160
|
+
const { disableHistory, disableSendFlowHistory, disableSwaps, isAutomaticGasFeeUpdateEnabled, getCurrentAccountEIP1559Compatibility, getCurrentNetworkEIP1559Compatibility, getExternalPendingTransactions, getGasFeeEstimates, getNetworkClientRegistry, getNetworkState, getPermittedAccounts, getSavedGasFees, incomingTransactions = {}, isFirstTimeInteractionEnabled, isSimulationEnabled, messenger, pendingTransactions = {}, publicKeyEIP7702, securityProviderRequest, sign, state, testGasFeeFlows, trace, transactionHistoryLimit = 40, hooks, } = options;
|
|
161
161
|
super({
|
|
162
162
|
name: controllerName,
|
|
163
163
|
metadata,
|
|
@@ -187,7 +187,8 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
187
187
|
__classPrivateFieldGet(this, _TransactionController_multichainTrackingHelper, "f").checkForPendingTransactionAndStartPolling();
|
|
188
188
|
});
|
|
189
189
|
this.messagingSystem = messenger;
|
|
190
|
-
this.isTxParamsGasFeeUpdatesEnabled =
|
|
190
|
+
this.isTxParamsGasFeeUpdatesEnabled =
|
|
191
|
+
isAutomaticGasFeeUpdateEnabled ?? ((_txMeta) => false);
|
|
191
192
|
this.getNetworkState = getNetworkState;
|
|
192
193
|
this.isSendFlowHistoryDisabled = disableSendFlowHistory ?? false;
|
|
193
194
|
this.isHistoryDisabled = disableHistory ?? false;
|