Skip to content

Commit

Permalink
fix: bid event return tx hash
Browse files Browse the repository at this point in the history
  • Loading branch information
HungLV46 committed Jul 3, 2024
1 parent 70d3b32 commit 00b2f77
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
} from "@/elasticsearch/indexes/activities/event-handlers/base";
import _ from "lodash";
import { logger } from "@/common/logger";
import { toBuffer } from "@/common/utils";

export class BidCreatedEventHandler extends BaseActivityEventHandler {
public orderId: string;
Expand Down Expand Up @@ -116,6 +117,10 @@ export class BidCreatedEventHandler extends BaseActivityEventHandler {
data.timestamp = data.originated_ts
? Math.floor(data.originated_ts)
: Math.floor(data.created_ts);

data.event_tx_hash = this.txHash ? toBuffer(this.txHash) : undefined;
data.event_log_index = this.logIndex;
data.event_batch_index = this.batchIndex;
}

static async generateActivities(events: OrderEventInfo[]): Promise<ActivityDocument[]> {
Expand Down

0 comments on commit 00b2f77

Please sign in to comment.