Skip to content

Commit b12917e

Browse files
authored
Api 672 add timestampMs field into transaction response (#1518)
* Add timestampMs field to Transaction interface and class * update specs * update accounts spec
1 parent 918e8de commit b12917e

4 files changed

Lines changed: 7 additions & 0 deletions

File tree

src/common/indexer/entities/transaction.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ export interface Transaction {
3535
relayerSignature: string;
3636
isRelayed: boolean;
3737
isScCall: boolean;
38+
timestampMs: number;
3839
}

src/endpoints/transactions/entities/transaction.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ export class Transaction {
7777
@ApiProperty({ type: Number })
7878
timestamp: number = 0;
7979

80+
@ApiProperty({ type: Number })
81+
timestampMs: number = 0;
82+
8083
@ApiProperty({ type: String, nullable: true, required: false })
8184
data: string | undefined = undefined;
8285

src/test/unit/services/accounts.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,7 @@ describe('Account Service', () => {
431431
isRelayed: false,
432432
isScCall: true,
433433
relayerSignature: '',
434+
timestampMs: 1698322776000,
434435
});
435436

436437
const result = await service.getAccountDeployedAtRaw(address);

src/test/unit/services/transactions.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ describe('TransactionService', () => {
211211
isRelayed: true,
212212
isScCall: true,
213213
relayerSignature: 'bc51e9032332740d60c404d4bf553ae225ca77a70ad799a1cdfc6e73609be8ec62e89ac6e2c2621ffbfb89e6fab620c137010662f3ebea9c422c9f1dbec04a03',
214+
timestampMs: 1698322776000,
214215
},
215216
{
216217
hash: '2b1ce5558f5faa533afd437a42a5aeadea8302dc3cca778c0ed50d19c0a047a4',
@@ -252,6 +253,7 @@ describe('TransactionService', () => {
252253
isRelayed: true,
253254
isScCall: true,
254255
relayerSignature: 'bc51e9032332740d60c404d4bf553ae225ca77a70ad799a1cdfc6e73609be8ec62e89ac6e2c2621ffbfb89e6fab620c137010662f3ebea9c422c9f1dbec04a03',
256+
timestampMs: 1698322776000,
255257
},
256258
];
257259

0 commit comments

Comments
 (0)