diff options
Diffstat (limited to 'packages/pipeline/src/entities')
-rw-r--r-- | packages/pipeline/src/entities/sra_order_observed_timestamp.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/pipeline/src/entities/sra_order_observed_timestamp.ts b/packages/pipeline/src/entities/sra_order_observed_timestamp.ts index cd2d41397..cbec1c6d0 100644 --- a/packages/pipeline/src/entities/sra_order_observed_timestamp.ts +++ b/packages/pipeline/src/entities/sra_order_observed_timestamp.ts @@ -22,11 +22,14 @@ export class SraOrdersObservedTimeStamp { * current time. * @param order The order to generate a timestamp for. */ -export function createObservedTimestampForOrder(order: SraOrder): SraOrdersObservedTimeStamp { +export function createObservedTimestampForOrder( + order: SraOrder, + observedTimestamp: number, +): SraOrdersObservedTimeStamp { const observed = new SraOrdersObservedTimeStamp(); observed.exchangeAddress = order.exchangeAddress; observed.orderHashHex = order.orderHashHex; observed.sourceUrl = order.sourceUrl; - observed.observedTimestamp = Date.now(); + observed.observedTimestamp = observedTimestamp; return observed; } |