Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
hwray committed Nov 22, 2024
1 parent 249890e commit ae0fe91
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ describe('update-perpetual-handler', () => {
await onMessage(kafkaMessage);

const perpetualMarket:
PerpetualMarketFromDatabase | undefined = await PerpetualMarketTable.findById(
event.id.toString(),
);
PerpetualMarketFromDatabase | undefined = await PerpetualMarketTable.findById(
event.id.toString(),
);
// TODO new fields
expect(perpetualMarket).toEqual(expect.objectContaining({
id: event.id.toString(),
Expand Down
2 changes: 1 addition & 1 deletion indexer/services/ender/__tests__/helpers/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ export const defaultTradeMessage: SingleTradeMessage = contentToSingleTradeMessa
testConstants.defaultPerpetualMarket.clobPairId,
);
export const defaultTradeKafkaEvent:
ConsolidatedKafkaEvent = createConsolidatedKafkaEventFromTrade(defaultTradeMessage);
ConsolidatedKafkaEvent = createConsolidatedKafkaEventFromTrade(defaultTradeMessage);

export const defaultStatefulOrderPlacementEvent: StatefulOrderEventV1 = {
orderPlace: {
Expand Down
12 changes: 6 additions & 6 deletions indexer/services/ender/src/lib/block-processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ export class BlockProcessor {
const event: IndexerTendermintEvent = this.block.events[i];
const transactionIndex: number = indexerTendermintEventToTransactionIndex(event);
const eventProtoWithType:
EventProtoWithTypeAndVersion | undefined = indexerTendermintEventToEventProtoWithType(
i,
event,
);
EventProtoWithTypeAndVersion | undefined = indexerTendermintEventToEventProtoWithType(
i,
event,
);
if (eventProtoWithType === undefined) {
continue;
}
Expand Down Expand Up @@ -193,12 +193,12 @@ export class BlockProcessor {
validatorMap: Record<string, ValidatorInitializer>,
): void {
const Initializer:
ValidatorInitializer | undefined = validatorMap[
ValidatorInitializer | undefined = validatorMap[
serializeSubtypeAndVersion(
eventProto.type,
eventProto.version,
)
];
];

if (Initializer === undefined) {
const message: string = `cannot process subtype ${eventProto.type} and version ${eventProto.version}`;
Expand Down
2 changes: 1 addition & 1 deletion indexer/services/ender/src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export type FundingEventMessage = {

export type SumFields = PerpetualPositionColumns.sumOpen | PerpetualPositionColumns.sumClose;
export type PriceFields = PerpetualPositionColumns.entryPrice |
PerpetualPositionColumns.exitPrice;
PerpetualPositionColumns.exitPrice;

export type OrderFillEventWithLiquidity = {
event: OrderFillEventV1,
Expand Down
2 changes: 1 addition & 1 deletion proto/dydxprotocol/indexer/events/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ message UpdateClobPairEventV1 {
// UpdatePerpetualEventV1 message contains all the information about an update
// to a perpetual on the dYdX chain.
// Deprecated. See UpdatePerpetualEventV2 for the most up to date message
// for the event to update a perpetual.
// for the event to update a perpetual.
message UpdatePerpetualEventV1 {
option deprecated = true;
// Unique Perpetual id.
Expand Down

0 comments on commit ae0fe91

Please sign in to comment.