Skip to content

Commit db54890

Browse files
committed
Fix linting, add changelogs
Signed-off-by: dan437 <80175477+dan437@users.noreply.github.com>
1 parent c52b70f commit db54890

3 files changed

Lines changed: 15 additions & 9 deletions

File tree

packages/transaction-controller/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
- Add optional `atomic` property to `TransactionBatchRequest` to configure whether EIP-7702 batch calls revert together or can fail independently ([#8320](https://github.com/MetaMask/core/pull/8320))
1313

14+
### Changed
15+
16+
- Preserve `submittedTime` if already set by a publish hook instead of overwriting it ([#8439](https://github.com/MetaMask/core/pull/8439))
17+
1418
## [64.1.0]
1519

1620
### Added

packages/transaction-controller/src/TransactionController.test.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2910,13 +2910,16 @@ describe('TransactionController', () => {
29102910
options: {
29112911
hooks: {
29122912
publish: async (txMeta) => {
2913-
const tx = controller.state.transactions.find(
2914-
(t) => t.id === txMeta.id,
2915-
);
2916-
controller.updateTransaction(
2917-
{ ...tx!, submittedTime: presetSubmittedTime },
2918-
'Set submittedTime in publish hook',
2913+
const existing = controller.state.transactions.find(
2914+
(transaction) => transaction.id === txMeta.id,
29192915
);
2916+
2917+
if (existing) {
2918+
controller.updateTransaction(
2919+
{ ...existing, submittedTime: presetSubmittedTime },
2920+
'Set submittedTime in publish hook',
2921+
);
2922+
}
29202923
return { transactionHash: '0x123' };
29212924
},
29222925
},

packages/transaction-pay-controller/CHANGELOG.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
### Changed
10+
### Fixed
1111

12-
- Bump `@metamask/ramps-controller` from `^13.0.0` to `^13.1.0` ([#8407](https://github.com/MetaMask/core/pull/8407))
13-
- Bump `@metamask/transaction-controller` from `^64.0.0` to `^64.1.0` ([#8432](https://github.com/MetaMask/core/pull/8432))
12+
- Set `submittedTime` at the start of `TransactionPayPublishHook` before strategy execution for accurate `mm_pay_time_to_complete_s` metrics in intent-based flows ([#8439](https://github.com/MetaMask/core/pull/8439))
1413

1514
## [19.1.0]
1615

0 commit comments

Comments
 (0)