@metamask-previews/transaction-controller 63.3.1-preview-bb9040b29 → 63.3.1-preview-26038d8d3
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 +0 -5
- package/dist/TransactionController.cjs +2 -12
- package/dist/TransactionController.cjs.map +1 -1
- package/dist/TransactionController.d.cts.map +1 -1
- package/dist/TransactionController.d.mts.map +1 -1
- package/dist/TransactionController.mjs +2 -12
- package/dist/TransactionController.mjs.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +0 -16
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +0 -16
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs.map +1 -1
- package/dist/utils/batch.cjs +1 -3
- package/dist/utils/batch.cjs.map +1 -1
- package/dist/utils/batch.mjs +1 -3
- package/dist/utils/batch.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,11 +11,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
11
11
|
|
|
12
12
|
- Bump `@metamask/accounts-controller` from `^37.1.0` to `^37.1.1` ([#8325](https://github.com/MetaMask/core/pull/8325))
|
|
13
13
|
- Bump `@metamask/controller-utils` from `^11.19.0` to `^11.20.0` ([#8344](https://github.com/MetaMask/core/pull/8344))
|
|
14
|
-
- Add extra parameters in types and change `addTransaction` behavior ([#8052](https://github.com/MetaMask/core/pull/8052))
|
|
15
|
-
- Add optional `excludeNativeTokenForFee` in `TransactionMeta` type.
|
|
16
|
-
- Add optional `actionId` and optional `excludeNativeTokenForFee` in `TransactionBatchRequest` type.
|
|
17
|
-
- Add optional `excludeNativeTokenForFee` to `AddTransactionOptions` type.
|
|
18
|
-
- Changed `isGasFeeTokenIgnoredIfBalance` to be false if `excludeNativeTokenForFee` is passed in `addTransaction`.
|
|
19
14
|
|
|
20
15
|
### Removed
|
|
21
16
|
|
|
@@ -405,7 +405,7 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
405
405
|
*/
|
|
406
406
|
async addTransaction(txParams, options) {
|
|
407
407
|
(0, logger_1.projectLogger)('Adding transaction', txParams, options);
|
|
408
|
-
const { actionId, assetsFiatValues, batchId, deviceConfirmedOn, disableGasBuffer, gasFeeToken,
|
|
408
|
+
const { actionId, assetsFiatValues, batchId, deviceConfirmedOn, disableGasBuffer, gasFeeToken, isGasFeeIncluded, isGasFeeSponsored, isStateOnly, method, nestedTransactions, networkClientId, origin, publishHook, requestId, requiredAssets, requireApproval, securityAlertResponse, skipInitialGasEstimate, swaps = {}, traceContext, type, } = options;
|
|
409
409
|
// eslint-disable-next-line no-param-reassign
|
|
410
410
|
txParams = (0, utils_2.normalizeTransactionParams)(txParams);
|
|
411
411
|
if (!__classPrivateFieldGet(this, _TransactionController_multichainTrackingHelper, "f").has(networkClientId)) {
|
|
@@ -443,12 +443,6 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
443
443
|
messenger: this.messenger,
|
|
444
444
|
networkClientId,
|
|
445
445
|
})).type;
|
|
446
|
-
/**
|
|
447
|
-
* Original behavior was that this was set to 'true' whenever a gasFeeToken was passed.
|
|
448
|
-
* 'excludeNativeTokenForFee' optionally overrides this behavior to prevent native token from
|
|
449
|
-
* being used when another gasFeeToken is set.
|
|
450
|
-
*/
|
|
451
|
-
const isGasFeeTokenIgnoredIfBalance = Boolean(gasFeeToken) && !excludeNativeTokenForFee;
|
|
452
446
|
let addedTransactionMeta = {
|
|
453
447
|
actionId,
|
|
454
448
|
assetsFiatValues,
|
|
@@ -458,13 +452,9 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
458
452
|
deviceConfirmedOn,
|
|
459
453
|
disableGasBuffer,
|
|
460
454
|
id: (0, uuid_1.v1)(),
|
|
461
|
-
isGasFeeTokenIgnoredIfBalance,
|
|
455
|
+
isGasFeeTokenIgnoredIfBalance: Boolean(gasFeeToken),
|
|
462
456
|
isGasFeeIncluded,
|
|
463
457
|
isGasFeeSponsored,
|
|
464
|
-
// To avoid the property to be set as undefined.
|
|
465
|
-
...(excludeNativeTokenForFee === undefined
|
|
466
|
-
? {}
|
|
467
|
-
: { excludeNativeTokenForFee }),
|
|
468
458
|
isFirstTimeInteraction: undefined,
|
|
469
459
|
isStateOnly,
|
|
470
460
|
nestedTransactions,
|