Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timestamps to l2 txs #457

Merged
merged 2 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 9 additions & 3 deletions packages/backend/src/api/controllers/L2TransactionController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export class L2TransactionController {
aggregatedL2Transaction: AggregatedL2TransactionRecord,
multiIndex: number | undefined,
altIndex: number | undefined
) {
): AggregatedL2TransactionRecord | undefined {
if (multiIndex !== undefined && altIndex !== undefined) {
const altTransaction =
aggregatedL2Transaction.alternativeTransactions[altIndex]
Expand All @@ -141,7 +141,10 @@ export class L2TransactionController {

return {
...aggregatedL2Transaction,
originalTransaction: multiTransaction,
originalTransaction: {
timestamp: altTransaction.timestamp,
...multiTransaction,
},
alternativeTransactions: [],
}
}
Expand All @@ -161,7 +164,10 @@ export class L2TransactionController {

return {
...aggregatedL2Transaction,
originalTransaction: multiTransaction,
originalTransaction: {
timestamp: aggregatedL2Transaction.originalTransaction.timestamp,
...multiTransaction,
},
alternativeTransactions: [],
}
}
Expand Down