Skip to content

Commit

Permalink
fix: remove stringDate transformer
Browse files Browse the repository at this point in the history
  • Loading branch information
vasyl-ivanchuk committed Jan 4, 2024
1 parent 7dcbdbe commit ac88d80
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 55 deletions.
3 changes: 1 addition & 2 deletions packages/worker/src/entities/addressTransaction.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { Block } from "./block.entity";
import { Transaction } from "./transaction.entity";
import { hexTransformer } from "../transformers/hex.transformer";
import { bigIntNumberTransformer } from "../transformers/bigIntNumber.transformer";
import { stringDateTransformer } from "../transformers/stringDate.transformer";

@Entity({ name: "addressTransactions" })
@Index(["address", "blockNumber", "receivedAt", "transactionIndex"])
Expand All @@ -31,7 +30,7 @@ export class AddressTransaction extends BaseEntity {
@Column({ type: "bigint", transformer: bigIntNumberTransformer })
public readonly blockNumber: number;

@Column({ type: "timestamp", transformer: stringDateTransformer })
@Column({ type: "timestamp" })
public readonly receivedAt: string;

@Column({ type: "int" })
Expand Down
3 changes: 1 addition & 2 deletions packages/worker/src/entities/addressTransfer.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { Transfer } from "./transfer.entity";
import { TokenType } from "./token.entity";
import { hexTransformer } from "../transformers/hex.transformer";
import { bigIntNumberTransformer } from "../transformers/bigIntNumber.transformer";
import { stringDateTransformer } from "../transformers/stringDate.transformer";
import { TransferFields } from "../dataFetcher/types";

@Entity({ name: "addressTransfers" })
Expand Down Expand Up @@ -39,7 +38,7 @@ export class AddressTransfer extends BaseEntity {
@Column({ type: "bigint", transformer: bigIntNumberTransformer })
public readonly blockNumber: number;

@Column({ type: "timestamp", transformer: stringDateTransformer })
@Column({ type: "timestamp" })
public readonly timestamp: string;

@Column({ type: "enum", enum: TokenType, default: TokenType.ETH })
Expand Down
3 changes: 1 addition & 2 deletions packages/worker/src/entities/log.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { hash64HexTransformer } from "../transformers/hash64Hex.transformer";
import { hexTransformer } from "../transformers/hex.transformer";
import { hexArrayTransformer } from "../transformers/hexArray.transformer";
import { bigIntNumberTransformer } from "../transformers/bigIntNumber.transformer";
import { stringDateTransformer } from "../transformers/stringDate.transformer";
import { BaseEntity } from "./base.entity";

@Entity({ name: "logs" })
Expand Down Expand Up @@ -49,6 +48,6 @@ export class Log extends BaseEntity {
@Column({ type: "int" })
public readonly logIndex: number;

@Column({ type: "timestamp", transformer: stringDateTransformer })
@Column({ type: "timestamp" })
public readonly timestamp: string;
}
3 changes: 1 addition & 2 deletions packages/worker/src/entities/transaction.entity.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Entity, Column, PrimaryColumn, JoinColumn, ManyToOne, Index } from "typeorm";
import { stringDateTransformer } from "../transformers/stringDate.transformer";
import { bigIntNumberTransformer } from "../transformers/bigIntNumber.transformer";
import { hexTransformer } from "../transformers/hex.transformer";
import { Batch } from "./batch.entity";
Expand Down Expand Up @@ -84,7 +83,7 @@ export class Transaction extends CountableEntity {
@Column({ type: "boolean" })
public readonly isL1Originated: boolean;

@Column({ type: "timestamp", transformer: stringDateTransformer })
@Column({ type: "timestamp" })
public readonly receivedAt: string;

@Column({ type: "int", default: 1 })
Expand Down
3 changes: 1 addition & 2 deletions packages/worker/src/entities/transfer.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { TokenType } from "./token.entity";
import { hash64HexTransformer } from "../transformers/hash64Hex.transformer";
import { hexTransformer } from "../transformers/hex.transformer";
import { bigIntNumberTransformer } from "../transformers/bigIntNumber.transformer";
import { stringDateTransformer } from "../transformers/stringDate.transformer";
import { TransferFields } from "../dataFetcher/types";

export enum TransferType {
Expand Down Expand Up @@ -49,7 +48,7 @@ export class Transfer extends CountableEntity {
@Column({ type: "bytea", nullable: true, transformer: hash64HexTransformer })
public readonly transactionHash?: string;

@Column({ type: "timestamp", transformer: stringDateTransformer })
@Column({ type: "timestamp" })
public readonly timestamp: string;

@Column({ type: "int" })
Expand Down
29 changes: 0 additions & 29 deletions packages/worker/src/transformers/stringDate.transformer.spec.ts

This file was deleted.

16 changes: 0 additions & 16 deletions packages/worker/src/transformers/stringDate.transformer.ts

This file was deleted.

0 comments on commit ac88d80

Please sign in to comment.