@metamask/transaction-controller 68.0.0 → 68.1.0
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 +15 -1
- package/dist/TransactionController.cjs +18 -20
- 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 +18 -20
- package/dist/TransactionController.mjs.map +1 -1
- package/dist/utils/provider.cjs +35 -3
- package/dist/utils/provider.cjs.map +1 -1
- package/dist/utils/provider.d.cts.map +1 -1
- package/dist/utils/provider.d.mts.map +1 -1
- package/dist/utils/provider.mjs +35 -3
- package/dist/utils/provider.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [68.1.0]
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Add RPC method, chain ID, and endpoint type context to transaction provider errors, including raw transaction submission failures ([#9144](https://github.com/MetaMask/core/pull/9144))
|
|
15
|
+
|
|
16
|
+
## [68.0.1]
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- Set `isExternalSign` to `true` when `isGasFeeSponsored` is confirmed by simulation, so gas-sponsored transactions from accounts that cannot locally sign (e.g. Money Account keyring) skip `KeyringController:signTransaction` ([#9148](https://github.com/MetaMask/core/pull/9148))
|
|
21
|
+
|
|
10
22
|
## [68.0.0]
|
|
11
23
|
|
|
12
24
|
### Changed
|
|
@@ -2500,7 +2512,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
2500
2512
|
|
|
2501
2513
|
All changes listed after this point were applied to this package following the monorepo conversion.
|
|
2502
2514
|
|
|
2503
|
-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@68.
|
|
2515
|
+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@68.1.0...HEAD
|
|
2516
|
+
[68.1.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@68.0.1...@metamask/transaction-controller@68.1.0
|
|
2517
|
+
[68.0.1]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@68.0.0...@metamask/transaction-controller@68.0.1
|
|
2504
2518
|
[68.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@67.1.0...@metamask/transaction-controller@68.0.0
|
|
2505
2519
|
[67.1.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@67.0.0...@metamask/transaction-controller@67.1.0
|
|
2506
2520
|
[67.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@66.0.1...@metamask/transaction-controller@67.0.0
|
|
@@ -425,6 +425,7 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
425
425
|
isGasFeeTokenIgnoredIfBalance,
|
|
426
426
|
isGasFeeIncluded,
|
|
427
427
|
isGasFeeSponsored,
|
|
428
|
+
...(isGasFeeSponsored ? { isExternalSign: true } : {}),
|
|
428
429
|
// To avoid the property to be set as undefined.
|
|
429
430
|
...(excludeNativeTokenForFee === undefined
|
|
430
431
|
? {}
|
|
@@ -1724,27 +1725,20 @@ async function _TransactionController_approveTransaction(transactionId, traceCon
|
|
|
1724
1725
|
clearNonceLock?.();
|
|
1725
1726
|
}
|
|
1726
1727
|
}, _TransactionController_publishTransaction = async function _TransactionController_publishTransaction(transactionMeta, { skipSubmitHistory } = {}) {
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
throw new Error('Missing raw transaction');
|
|
1731
|
-
}
|
|
1732
|
-
const transactionHash = (await (0, provider_1.rpcRequest)({
|
|
1733
|
-
messenger: this.messenger,
|
|
1734
|
-
networkClientId,
|
|
1735
|
-
method: 'eth_sendRawTransaction',
|
|
1736
|
-
params: [rawTx],
|
|
1737
|
-
}));
|
|
1738
|
-
if (skipSubmitHistory !== true) {
|
|
1739
|
-
__classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_updateSubmitHistory).call(this, transactionMeta, transactionHash);
|
|
1740
|
-
}
|
|
1741
|
-
return transactionHash;
|
|
1728
|
+
const { networkClientId, rawTx } = transactionMeta;
|
|
1729
|
+
if (!rawTx) {
|
|
1730
|
+
throw new Error('Missing raw transaction');
|
|
1742
1731
|
}
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1732
|
+
const transactionHash = (await (0, provider_1.rpcRequest)({
|
|
1733
|
+
messenger: this.messenger,
|
|
1734
|
+
networkClientId,
|
|
1735
|
+
method: 'eth_sendRawTransaction',
|
|
1736
|
+
params: [rawTx],
|
|
1737
|
+
}));
|
|
1738
|
+
if (skipSubmitHistory !== true) {
|
|
1739
|
+
__classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_updateSubmitHistory).call(this, transactionMeta, transactionHash);
|
|
1747
1740
|
}
|
|
1741
|
+
return transactionHash;
|
|
1748
1742
|
}, _TransactionController_rejectTransaction = function _TransactionController_rejectTransaction(transactionId, actionId, error) {
|
|
1749
1743
|
const transactionMeta = __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_getTransaction).call(this, transactionId);
|
|
1750
1744
|
if (!transactionMeta) {
|
|
@@ -2197,7 +2191,11 @@ async function _TransactionController_approveTransaction(transactionId, traceCon
|
|
|
2197
2191
|
skipResimulateCheck: Boolean(blockTime),
|
|
2198
2192
|
}, (txMeta) => {
|
|
2199
2193
|
txMeta.gasFeeTokens = gasFeeTokens;
|
|
2200
|
-
txMeta.isGasFeeSponsored =
|
|
2194
|
+
txMeta.isGasFeeSponsored =
|
|
2195
|
+
txMeta.isGasFeeSponsored ?? isGasFeeSponsored;
|
|
2196
|
+
if (txMeta.isGasFeeSponsored) {
|
|
2197
|
+
txMeta.isExternalSign = true;
|
|
2198
|
+
}
|
|
2201
2199
|
txMeta.gasUsed = gasUsed;
|
|
2202
2200
|
if (!__classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_isBalanceChangesSkipped).call(this, txMeta)) {
|
|
2203
2201
|
txMeta.simulationData = simulationData;
|