Skip to content

Commit b974d2f

Browse files
committed
task: patch missing meta propertis in to transaction dto
1 parent 0b6e5d4 commit b974d2f

File tree

3 files changed

+33
-3
lines changed

3 files changed

+33
-3
lines changed

src/infrastructure/transaction/CreateTransactionFromDTO.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,25 @@ const extractTransactionMeta = (meta: any, id: string): TransactionInfo | Aggreg
118118
return undefined;
119119
}
120120
if (meta.aggregateHash || meta.aggregateId) {
121-
return new AggregateTransactionInfo(UInt64.fromNumericString(meta.height), meta.index, id, meta.aggregateHash, meta.aggregateId);
121+
return new AggregateTransactionInfo(
122+
UInt64.fromNumericString(meta.height),
123+
meta.index,
124+
id,
125+
UInt64.fromNumericString(meta.timestamp),
126+
meta.feeMultiplier,
127+
meta.aggregateHash,
128+
meta.aggregateId,
129+
);
122130
}
123-
return new TransactionInfo(UInt64.fromNumericString(meta.height), meta.index, id, meta.hash, meta.merkleComponentHash);
131+
return new TransactionInfo(
132+
UInt64.fromNumericString(meta.height),
133+
meta.index,
134+
id,
135+
UInt64.fromNumericString(meta.timestamp),
136+
meta.feeMultiplier,
137+
meta.hash,
138+
meta.merkleComponentHash,
139+
);
124140
};
125141
/**
126142
* @internal

src/model/transaction/AggregateTransactionInfo.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,15 @@ export class AggregateTransactionInfo extends TransactionInfo {
2727
* @param id
2828
* @param aggregateHash
2929
* @param aggregateId
30+
* @param timestamp
31+
* @param feeMultiplier
3032
*/
3133
constructor(
3234
height: UInt64,
3335
index: number,
3436
id: string,
37+
timestamp: UInt64,
38+
feeMultiplier: number,
3539
/**
3640
* The hash of the aggregate transaction.
3741
*/
@@ -41,6 +45,6 @@ export class AggregateTransactionInfo extends TransactionInfo {
4145
*/
4246
public readonly aggregateId: string,
4347
) {
44-
super(height, index, id);
48+
super(height, index, id, timestamp, feeMultiplier);
4549
}
4650
}

src/model/transaction/TransactionInfo.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ export class TransactionInfo {
2424
* @param height
2525
* @param index
2626
* @param id
27+
* @param timestamp
28+
* @param feeMultiplier
2729
* @param hash
2830
* @param merkleComponentHash
2931
*/
@@ -40,6 +42,14 @@ export class TransactionInfo {
4042
* The transaction db id.
4143
*/
4244
public readonly id: string,
45+
/**
46+
* The transaction timestamp.
47+
*/
48+
public readonly timestamp?: UInt64,
49+
/**
50+
* The transaction fee multiplier.
51+
*/
52+
public readonly feeMultiplier?: number,
4353
/**
4454
* The transaction hash.
4555
*/

0 commit comments

Comments
 (0)