@metamask-previews/transaction-controller 69.5.2-preview-e81fe8853 → 69.5.2-preview-3c77cf4
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 +1 -0
- package/dist/TransactionController.cjs +3 -3
- package/dist/TransactionController.cjs.map +1 -1
- package/dist/TransactionController.d.cts +1 -1
- package/dist/TransactionController.d.cts.map +1 -1
- package/dist/TransactionController.d.mts +1 -1
- package/dist/TransactionController.d.mts.map +1 -1
- package/dist/TransactionController.mjs +3 -3
- package/dist/TransactionController.mjs.map +1 -1
- package/dist/utils/batch.cjs.map +1 -1
- package/dist/utils/batch.d.cts +1 -1
- package/dist/utils/batch.d.cts.map +1 -1
- package/dist/utils/batch.d.mts +1 -1
- package/dist/utils/batch.d.mts.map +1 -1
- package/dist/utils/batch.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
10
10
|
### Changed
|
|
11
11
|
|
|
12
12
|
- Bump `@metamask/core-backend` from `^8.1.1` to `^8.1.2` ([#9886](https://github.com/MetaMask/core/pull/9886))
|
|
13
|
+
- Extend `isSimulationEnabled` option to accept an optional `TransactionMeta` argument, enabling callback consumers to inspect the relevant transaction ([#9800](https://github.com/MetaMask/core/pull/9800))
|
|
13
14
|
|
|
14
15
|
## [69.5.2]
|
|
15
16
|
|
|
@@ -2177,7 +2177,7 @@ async function _TransactionController_approveTransaction(transactionId, traceCon
|
|
|
2177
2177
|
transactionMeta.txParams = (0, utils_js_1.normalizeTransactionParams)(transactionMeta.txParams);
|
|
2178
2178
|
(0, validation_js_1.validateTxParams)(transactionMeta.txParams);
|
|
2179
2179
|
}
|
|
2180
|
-
if (!skipResimulateCheck && __classPrivateFieldGet(this, _TransactionController_isSimulationEnabled, "f").call(this)) {
|
|
2180
|
+
if (!skipResimulateCheck && __classPrivateFieldGet(this, _TransactionController_isSimulationEnabled, "f").call(this, transactionMeta)) {
|
|
2181
2181
|
resimulateResponse = (0, ResimulateHelper_js_1.shouldResimulate)(originalTransactionMeta, transactionMeta);
|
|
2182
2182
|
}
|
|
2183
2183
|
state.transactions[index] = transactionMeta;
|
|
@@ -2211,7 +2211,7 @@ async function _TransactionController_approveTransaction(transactionId, traceCon
|
|
|
2211
2211
|
const simulationRequestToken = Symbol(transactionId);
|
|
2212
2212
|
__classPrivateFieldGet(this, _TransactionController_simulationRequestTokens, "f").set(transactionId, simulationRequestToken);
|
|
2213
2213
|
try {
|
|
2214
|
-
const isSimulationEnabled = __classPrivateFieldGet(this, _TransactionController_isSimulationEnabled, "f").call(this);
|
|
2214
|
+
const isSimulationEnabled = __classPrivateFieldGet(this, _TransactionController_isSimulationEnabled, "f").call(this, transactionMeta);
|
|
2215
2215
|
const isBalanceChangesSkipped = __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_isBalanceChangesSkipped).call(this, transactionMeta);
|
|
2216
2216
|
if (isSimulationEnabled && !isBalanceChangesSkipped) {
|
|
2217
2217
|
const balanceChangesResult = await __classPrivateFieldGet(this, _TransactionController_trace, "f").call(this, { name: 'Simulate', parentContext: traceContext }, () => (0, balance_changes_js_1.getBalanceChanges)({
|
|
@@ -2346,7 +2346,7 @@ async function _TransactionController_approveTransaction(transactionId, traceCon
|
|
|
2346
2346
|
.configuration.type === network_controller_1.NetworkClientType.Custom;
|
|
2347
2347
|
await (0, gas_js_1.updateGas)({
|
|
2348
2348
|
isCustomNetwork,
|
|
2349
|
-
isSimulationEnabled: __classPrivateFieldGet(this, _TransactionController_isSimulationEnabled, "f").call(this),
|
|
2349
|
+
isSimulationEnabled: __classPrivateFieldGet(this, _TransactionController_isSimulationEnabled, "f").call(this, transactionMeta),
|
|
2350
2350
|
getSimulationConfig: __classPrivateFieldGet(this, _TransactionController_getSimulationConfig, "f"),
|
|
2351
2351
|
messenger: this.messenger,
|
|
2352
2352
|
txMeta: transactionMeta,
|