Skip to content

Commit 785aec4

Browse files
committed
Update changelog
1 parent 44e6bc6 commit 785aec4

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

packages/transaction-controller/CHANGELOG.md

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

1010
### Added
1111

12+
- Support security validation of transaction batches ([#5526](https://github.com/MetaMask/core/pull/5526))
13+
- Add `ValidateSecurityRequest` type.
14+
- Add optional `securityAlertId` to `SecurityAlertResponse`.
15+
- Add optional `securityAlertId` to `TransactionBatchRequest`.
16+
- Add optional `validateSecurity` callback to `TransactionBatchRequest`.
1217
- Support publish batch hook ([#5401](https://github.com/MetaMask/core/pull/5401))
1318
- Add `hooks.publishBatch` option to constructor.
1419
- Add `updateBatchTransactions` method.

packages/transaction-controller/src/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,8 +1140,8 @@ export type TransactionError = {
11401140
export type SecurityAlertResponse = {
11411141
features?: string[];
11421142
providerRequestsCount?: Record<string, number>;
1143-
reason?: string;
1144-
result_type?: string;
1143+
reason: string;
1144+
result_type: string;
11451145
securityAlertId?: string;
11461146
};
11471147

packages/transaction-controller/src/utils/batch.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import { CollectPublishHook } from '../hooks/CollectPublishHook';
2626
import { projectLogger } from '../logger';
2727
import type {
2828
NestedTransactionMetadata,
29+
SecurityAlertResponse,
2930
TransactionBatchSingleRequest,
3031
PublishBatchHook,
3132
PublishBatchHookTransaction,
@@ -189,7 +190,7 @@ export async function addTransactionBatch(
189190
const batchId = batchIdOverride ?? generateBatchId();
190191

191192
const securityAlertResponse = securityAlertId
192-
? { securityAlertId }
193+
? ({ securityAlertId } as SecurityAlertResponse)
193194
: undefined;
194195

195196
const { result } = await addTransaction(txParams, {

0 commit comments

Comments
 (0)