@metamask-previews/transaction-controller 60.1.0-preview-c2598d9e → 60.1.0-preview-f06fad2b
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 +4 -0
- package/dist/TransactionController.cjs +3 -1
- package/dist/TransactionController.cjs.map +1 -1
- package/dist/TransactionController.d.cts +2 -0
- package/dist/TransactionController.d.cts.map +1 -1
- package/dist/TransactionController.d.mts +2 -0
- package/dist/TransactionController.d.mts.map +1 -1
- package/dist/TransactionController.mjs +3 -1
- package/dist/TransactionController.mjs.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +10 -6
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +10 -6
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs.map +1 -1
- package/dist/utils/batch.cjs +1 -0
- package/dist/utils/batch.cjs.map +1 -1
- package/dist/utils/batch.mjs +1 -0
- package/dist/utils/batch.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Add `isGasFeeIncluded` to `TransactionMeta`, `TransactionBatchRequest` and `addTransaction` options so the client can signal that MetaMask is compensated for the gas fee by the transaction ([#6428](https://github.com/MetaMask/core/pull/6428))
|
|
13
|
+
|
|
10
14
|
## [60.1.0]
|
|
11
15
|
|
|
12
16
|
### Added
|
|
@@ -367,6 +367,7 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
367
367
|
* @param options.batchId - A custom ID for the batch this transaction belongs to.
|
|
368
368
|
* @param options.deviceConfirmedOn - An enum to indicate what device confirmed the transaction.
|
|
369
369
|
* @param options.disableGasBuffer - Whether to disable the gas estimation buffer.
|
|
370
|
+
* @param options.isGasFeeIncluded - Whether MetaMask will be compensated for the gas fee by the transaction.
|
|
370
371
|
* @param options.method - RPC method that requested the transaction.
|
|
371
372
|
* @param options.nestedTransactions - Params for any nested transactions encoded in the data.
|
|
372
373
|
* @param options.origin - The origin of the transaction request, such as a dApp hostname.
|
|
@@ -384,7 +385,7 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
384
385
|
*/
|
|
385
386
|
async addTransaction(txParams, options) {
|
|
386
387
|
(0, logger_1.projectLogger)('Adding transaction', txParams, options);
|
|
387
|
-
const { actionId, assetsFiatValues, batchId, deviceConfirmedOn, disableGasBuffer, method, nestedTransactions, networkClientId, origin, publishHook, requireApproval, securityAlertResponse, sendFlowHistory, swaps = {}, traceContext, type, } = options;
|
|
388
|
+
const { actionId, assetsFiatValues, batchId, deviceConfirmedOn, disableGasBuffer, isGasFeeIncluded, method, nestedTransactions, networkClientId, origin, publishHook, requireApproval, securityAlertResponse, sendFlowHistory, swaps = {}, traceContext, type, } = options;
|
|
388
389
|
txParams = (0, utils_2.normalizeTransactionParams)(txParams);
|
|
389
390
|
if (!__classPrivateFieldGet(this, _TransactionController_multichainTrackingHelper, "f").has(networkClientId)) {
|
|
390
391
|
throw new Error(`Network client not found - ${networkClientId}`);
|
|
@@ -436,6 +437,7 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
436
437
|
deviceConfirmedOn,
|
|
437
438
|
disableGasBuffer,
|
|
438
439
|
id: (0, uuid_1.v1)(),
|
|
440
|
+
isGasFeeIncluded,
|
|
439
441
|
isFirstTimeInteraction: undefined,
|
|
440
442
|
nestedTransactions,
|
|
441
443
|
networkClientId,
|