diff --git a/packages/api/src/api/account/account.controller.spec.ts b/packages/api/src/api/account/account.controller.spec.ts index 912a81c166..f5b2f14c6e 100644 --- a/packages/api/src/api/account/account.controller.spec.ts +++ b/packages/api/src/api/account/account.controller.spec.ts @@ -3,7 +3,7 @@ import { mock } from "jest-mock-extended"; import { BadRequestException, Logger } from "@nestjs/common"; import { L2_ETH_TOKEN_ADDRESS } from "../../common/constants"; import { BlockService } from "../../block/block.service"; -import { BlockDetail } from "../../block/blockDetail.entity"; +import { BlockDetails } from "../../block/blockDetails.entity"; import { TransactionService } from "../../transaction/transaction.service"; import { BalanceService } from "../../balance/balance.service"; import { TransactionStatus } from "../../transaction/entities/transaction.entity"; @@ -629,7 +629,7 @@ describe("AccountController", () => { it("returns blocks list response when block by miner are found", async () => { jest .spyOn(blockServiceMock, "findMany") - .mockResolvedValue([{ number: 1, timestamp: new Date("2023-03-03") } as BlockDetail]); + .mockResolvedValue([{ number: 1, timestamp: new Date("2023-03-03") } as BlockDetails]); const response = await controller.getAccountMinedBlocks(address, { page: 1, offset: 10, diff --git a/packages/api/src/api/transaction/transaction.controller.spec.ts b/packages/api/src/api/transaction/transaction.controller.spec.ts index a0607a845b..a74a252aa0 100644 --- a/packages/api/src/api/transaction/transaction.controller.spec.ts +++ b/packages/api/src/api/transaction/transaction.controller.spec.ts @@ -4,7 +4,7 @@ import { Logger } from "@nestjs/common"; import { TransactionService } from "../../transaction/transaction.service"; import { TransactionReceiptService } from "../../transaction/transactionReceipt.service"; import { TransactionStatus } from "../../transaction/entities/transaction.entity"; -import { TransactionDetail } from "../../transaction/entities/transactionDetail.entity"; +import { TransactionDetails } from "../../transaction/entities/transactionDetails.entity"; import { TransactionReceipt } from "../../transaction/entities/transactionReceipt.entity"; import { ResponseStatus, ResponseMessage } from "../dtos/common/responseBase.dto"; import { TransactionController } from "./transaction.controller"; @@ -57,7 +57,7 @@ describe("TransactionController", () => { it("returns isError as 0 when transaction is successful", async () => { jest .spyOn(transactionServiceMock, "findOne") - .mockResolvedValue({ status: TransactionStatus.Included } as TransactionDetail); + .mockResolvedValue({ status: TransactionStatus.Included } as TransactionDetails); const response = await controller.getTransactionStatus(transactionHash); expect(response).toEqual({ @@ -73,7 +73,7 @@ describe("TransactionController", () => { it("returns isError as 1 when transaction is failed", async () => { jest .spyOn(transactionServiceMock, "findOne") - .mockResolvedValue({ status: TransactionStatus.Failed } as TransactionDetail); + .mockResolvedValue({ status: TransactionStatus.Failed } as TransactionDetails); const response = await controller.getTransactionStatus(transactionHash); expect(response).toEqual({ diff --git a/packages/api/src/block/block.controller.ts b/packages/api/src/block/block.controller.ts index 25488e4506..f9a3a4febf 100644 --- a/packages/api/src/block/block.controller.ts +++ b/packages/api/src/block/block.controller.ts @@ -14,7 +14,7 @@ import { PagingOptionsDto, ListFiltersDto } from "../common/dtos"; import { ApiListPageOkResponse } from "../common/decorators/apiListPageOkResponse"; import { BlockService } from "./block.service"; import { BlockDto } from "./block.dto"; -import { BlockDetailDto } from "./blockDetail.dto"; +import { BlockDetailsDto } from "./blockDetails.dto"; import { swagger } from "../config/featureFlags"; const entityName = "blocks"; @@ -48,12 +48,12 @@ export class BlockController { example: "1", description: "Block number", }) - @ApiOkResponse({ description: "Block was returned successfully", type: BlockDetailDto }) + @ApiOkResponse({ description: "Block was returned successfully", type: BlockDetailsDto }) @ApiBadRequestResponse({ description: "Block number is invalid" }) @ApiNotFoundResponse({ description: "Block with the specified number does not exist" }) public async getBlock( @Param("blockNumber", new ParseLimitedIntPipe({ min: 0 })) blockNumber: number - ): Promise { + ): Promise { const block = await this.blockService.findOne(blockNumber); if (!block) { throw new NotFoundException(); diff --git a/packages/api/src/block/block.module.ts b/packages/api/src/block/block.module.ts index cbca1ea4d3..05687a8292 100644 --- a/packages/api/src/block/block.module.ts +++ b/packages/api/src/block/block.module.ts @@ -3,10 +3,10 @@ import { TypeOrmModule } from "@nestjs/typeorm"; import { BlockService } from "../block/block.service"; import { BlockController } from "./block.controller"; import { Block } from "./block.entity"; -import { BlockDetail } from "./blockDetail.entity"; +import { BlockDetails } from "./blockDetails.entity"; @Module({ - imports: [TypeOrmModule.forFeature([Block, BlockDetail])], + imports: [TypeOrmModule.forFeature([Block, BlockDetails])], controllers: [BlockController], providers: [BlockService], exports: [BlockService], diff --git a/packages/api/src/block/block.service.spec.ts b/packages/api/src/block/block.service.spec.ts index 90884e8de7..b1d2c853da 100644 --- a/packages/api/src/block/block.service.spec.ts +++ b/packages/api/src/block/block.service.spec.ts @@ -6,7 +6,7 @@ import { Pagination, IPaginationMeta } from "nestjs-typeorm-paginate"; import * as utils from "../common/utils"; import { BlockService, FindManyOptions } from "./block.service"; import { Block } from "./block.entity"; -import { BlockDetail } from "./blockDetail.entity"; +import { BlockDetails } from "./blockDetails.entity"; jest.mock("../common/utils"); @@ -14,11 +14,11 @@ describe("BlockService", () => { let blockRecord; let service: BlockService; let repositoryMock: Repository; - let blockDetailRepositoryMock: Repository; + let blockDetailRepositoryMock: Repository; beforeEach(async () => { repositoryMock = mock>(); - blockDetailRepositoryMock = mock>(); + blockDetailRepositoryMock = mock>(); blockRecord = { number: 123, @@ -32,7 +32,7 @@ describe("BlockService", () => { useValue: repositoryMock, }, { - provide: getRepositoryToken(BlockDetail), + provide: getRepositoryToken(BlockDetails), useValue: blockDetailRepositoryMock, }, ], @@ -305,7 +305,7 @@ describe("BlockService", () => { let filterOptions: FindManyOptions; beforeEach(() => { - queryBuilderMock = mock>({ + queryBuilderMock = mock>({ getMany: jest.fn().mockResolvedValue([ { number: 1, diff --git a/packages/api/src/block/block.service.ts b/packages/api/src/block/block.service.ts index bc289d9886..ef5f37735c 100644 --- a/packages/api/src/block/block.service.ts +++ b/packages/api/src/block/block.service.ts @@ -5,13 +5,13 @@ import { Pagination } from "nestjs-typeorm-paginate"; import { paginate } from "../common/utils"; import { IPaginationOptions } from "../common/types"; import { Block } from "./block.entity"; -import { BlockDetail } from "./blockDetail.entity"; +import { BlockDetails } from "./blockDetails.entity"; export interface FindManyOptions { miner?: string; page?: number; offset?: number; - selectFields?: (keyof BlockDetail)[]; + selectFields?: (keyof BlockDetails)[]; } @Injectable() @@ -19,8 +19,8 @@ export class BlockService { public constructor( @InjectRepository(Block) private readonly blocksRepository: Repository, - @InjectRepository(BlockDetail) - private readonly blockDetailsRepository: Repository + @InjectRepository(BlockDetails) + private readonly blockDetailsRepository: Repository ) {} private getBlock(filterOptions: FindOptionsWhere, orderOptions: FindOptionsOrder): Promise { @@ -50,9 +50,9 @@ export class BlockService { public async findOne( number: number, - selectFields?: (keyof BlockDetail)[], - relations: FindOptionsRelations = { batch: true } - ): Promise { + selectFields?: (keyof BlockDetails)[], + relations: FindOptionsRelations = { batch: true } + ): Promise { return await this.blockDetailsRepository.findOne({ where: { number }, relations: relations, @@ -90,7 +90,7 @@ export class BlockService { return await paginate(queryBuilder, paginationOptions, () => this.count(filterOptions)); } - public async findMany({ miner, page = 1, offset = 10, selectFields }: FindManyOptions): Promise { + public async findMany({ miner, page = 1, offset = 10, selectFields }: FindManyOptions): Promise { const queryBuilder = this.blockDetailsRepository.createQueryBuilder("block"); queryBuilder.addSelect(selectFields); if (miner) { diff --git a/packages/api/src/block/blockDetail.dto.ts b/packages/api/src/block/blockDetails.dto.ts similarity index 98% rename from packages/api/src/block/blockDetail.dto.ts rename to packages/api/src/block/blockDetails.dto.ts index 6034d3c86b..d80673960e 100644 --- a/packages/api/src/block/blockDetail.dto.ts +++ b/packages/api/src/block/blockDetails.dto.ts @@ -1,7 +1,7 @@ import { ApiProperty } from "@nestjs/swagger"; import { BlockDto } from "./block.dto"; -export class BlockDetailDto extends BlockDto { +export class BlockDetailsDto extends BlockDto { @ApiProperty({ type: String, description: "The hash of the previous block", diff --git a/packages/api/src/block/blockDetail.entity.ts b/packages/api/src/block/blockDetails.entity.ts similarity index 97% rename from packages/api/src/block/blockDetail.entity.ts rename to packages/api/src/block/blockDetails.entity.ts index b5d81236eb..151f812a98 100644 --- a/packages/api/src/block/blockDetail.entity.ts +++ b/packages/api/src/block/blockDetails.entity.ts @@ -3,7 +3,7 @@ import { Block } from "./block.entity"; import { hexTransformer } from "../common/transformers/hex.transformer"; @Entity({ name: "blocks" }) -export class BlockDetail extends Block { +export class BlockDetails extends Block { @Column({ type: "bytea", transformer: hexTransformer, nullable: true }) public readonly parentHash?: string; diff --git a/packages/api/src/transaction/dtos/transactionDetail.dto.ts b/packages/api/src/transaction/dtos/transactionDetails.dto.ts similarity index 80% rename from packages/api/src/transaction/dtos/transactionDetail.dto.ts rename to packages/api/src/transaction/dtos/transactionDetails.dto.ts index 262ffd47e5..0f18c8b72a 100644 --- a/packages/api/src/transaction/dtos/transactionDetail.dto.ts +++ b/packages/api/src/transaction/dtos/transactionDetails.dto.ts @@ -1,7 +1,7 @@ import { ApiProperty } from "@nestjs/swagger"; import { TransactionDto } from "./transaction.dto"; -export class TransactionDetailDto extends TransactionDto { +export class TransactionDetailsDto extends TransactionDto { @ApiProperty({ type: String, description: "Gas used by the transaction", diff --git a/packages/api/src/transaction/entities/transactionDetail.entity.ts b/packages/api/src/transaction/entities/transactionDetails.entity.ts similarity index 89% rename from packages/api/src/transaction/entities/transactionDetail.entity.ts rename to packages/api/src/transaction/entities/transactionDetails.entity.ts index 0a18c910ef..1b8fdb9f4f 100644 --- a/packages/api/src/transaction/entities/transactionDetail.entity.ts +++ b/packages/api/src/transaction/entities/transactionDetails.entity.ts @@ -2,7 +2,7 @@ import { Entity } from "typeorm"; import { Transaction } from "./transaction.entity"; @Entity({ name: "transactions" }) -export class TransactionDetail extends Transaction { +export class TransactionDetails extends Transaction { public get gasUsed(): string { return this.transactionReceipt ? this.transactionReceipt.gasUsed : null; } diff --git a/packages/api/src/transaction/transaction.controller.ts b/packages/api/src/transaction/transaction.controller.ts index ed812c71eb..f8465723d9 100644 --- a/packages/api/src/transaction/transaction.controller.ts +++ b/packages/api/src/transaction/transaction.controller.ts @@ -14,7 +14,7 @@ import { buildDateFilter } from "../common/utils"; import { FilterTransactionsOptionsDto } from "./dtos/filterTransactionsOptions.dto"; import { TransferDto } from "../transfer/transfer.dto"; import { TransactionDto } from "./dtos/transaction.dto"; -import { TransactionDetailDto } from "./dtos/transactionDetail.dto"; +import { TransactionDetailsDto } from "./dtos/transactionDetails.dto"; import { TransferService } from "../transfer/transfer.service"; import { LogDto } from "../log/log.dto"; import { LogService } from "../log/log.service"; @@ -73,7 +73,7 @@ export class TransactionController { @ApiNotFoundResponse({ description: "Transaction with the specified hash does not exist" }) public async getTransaction( @Param("transactionHash", new ParseTransactionHashPipe()) transactionHash: string - ): Promise { + ): Promise { const transactionDetail = await this.transactionService.findOne(transactionHash); if (!transactionDetail) { throw new NotFoundException(); diff --git a/packages/api/src/transaction/transaction.module.ts b/packages/api/src/transaction/transaction.module.ts index 587d46553b..b121a319bd 100644 --- a/packages/api/src/transaction/transaction.module.ts +++ b/packages/api/src/transaction/transaction.module.ts @@ -4,7 +4,7 @@ import { TransactionController } from "./transaction.controller"; import { TransactionService } from "./transaction.service"; import { TransactionReceiptService } from "./transactionReceipt.service"; import { Transaction } from "./entities/transaction.entity"; -import { TransactionDetail } from "./entities/transactionDetail.entity"; +import { TransactionDetails } from "./entities/transactionDetails.entity"; import { AddressTransaction } from "./entities/addressTransaction.entity"; import { TransactionReceipt } from "./entities/transactionReceipt.entity"; import { Batch } from "../batch/batch.entity"; @@ -14,7 +14,7 @@ import { LogModule } from "../log/log.module"; @Module({ imports: [ - TypeOrmModule.forFeature([Transaction, TransactionDetail, AddressTransaction, TransactionReceipt, Batch]), + TypeOrmModule.forFeature([Transaction, TransactionDetails, AddressTransaction, TransactionReceipt, Batch]), TransferModule, LogModule, CounterModule, diff --git a/packages/api/src/transaction/transaction.service.spec.ts b/packages/api/src/transaction/transaction.service.spec.ts index e867ea09cd..b8c5e7e3cb 100644 --- a/packages/api/src/transaction/transaction.service.spec.ts +++ b/packages/api/src/transaction/transaction.service.spec.ts @@ -8,7 +8,7 @@ import { SortingOrder } from "../common/types"; import { CounterService } from "../counter/counter.service"; import { TransactionService, FilterTransactionsOptions } from "./transaction.service"; import { Transaction } from "./entities/transaction.entity"; -import { TransactionDetail } from "./entities/transactionDetail.entity"; +import { TransactionDetails } from "./entities/transactionDetails.entity"; import { AddressTransaction } from "./entities/addressTransaction.entity"; import { Batch } from "../batch/batch.entity"; @@ -18,7 +18,7 @@ describe("TransactionService", () => { let transaction; let service: TransactionService; let repositoryMock: typeorm.Repository; - let repositoryDetailMock: typeorm.Repository; + let repositoryDetailMock: typeorm.Repository; let addressTransactionRepositoryMock: typeorm.Repository; let batchRepositoryMock: typeorm.Repository; let counterServiceMock: CounterService; @@ -27,7 +27,7 @@ describe("TransactionService", () => { beforeEach(async () => { counterServiceMock = mock(); repositoryMock = mock>(); - repositoryDetailMock = mock>(); + repositoryDetailMock = mock>(); addressTransactionRepositoryMock = mock>(); batchRepositoryMock = mock>(); transaction = { @@ -42,7 +42,7 @@ describe("TransactionService", () => { useValue: repositoryMock, }, { - provide: getRepositoryToken(TransactionDetail), + provide: getRepositoryToken(TransactionDetails), useValue: repositoryDetailMock, }, { diff --git a/packages/api/src/transaction/transaction.service.ts b/packages/api/src/transaction/transaction.service.ts index 50d50026f1..a79376148f 100644 --- a/packages/api/src/transaction/transaction.service.ts +++ b/packages/api/src/transaction/transaction.service.ts @@ -5,7 +5,7 @@ import { Pagination } from "nestjs-typeorm-paginate"; import { paginate } from "../common/utils"; import { IPaginationOptions, CounterCriteria, SortingOrder } from "../common/types"; import { Transaction } from "./entities/transaction.entity"; -import { TransactionDetail } from "./entities/transactionDetail.entity"; +import { TransactionDetails } from "./entities/transactionDetails.entity"; import { AddressTransaction } from "./entities/addressTransaction.entity"; import { Batch } from "../batch/batch.entity"; import { CounterService } from "../counter/counter.service"; @@ -30,8 +30,8 @@ export class TransactionService { constructor( @InjectRepository(Transaction) private readonly transactionRepository: Repository, - @InjectRepository(TransactionDetail) - private readonly transactionDetailsRepository: Repository, + @InjectRepository(TransactionDetails) + private readonly transactionDetailsRepository: Repository, @InjectRepository(AddressTransaction) private readonly addressTransactionRepository: Repository, @InjectRepository(Batch) @@ -39,7 +39,7 @@ export class TransactionService { private readonly counterService: CounterService ) {} - public async findOne(hash: string): Promise { + public async findOne(hash: string): Promise { const queryBuilder = this.transactionDetailsRepository.createQueryBuilder("transaction"); queryBuilder.leftJoinAndSelect("transaction.batch", "batch"); queryBuilder.leftJoin("transaction.transactionReceipt", "transactionReceipt"); diff --git a/packages/api/test/account-api.e2e-spec.ts b/packages/api/test/account-api.e2e-spec.ts index 340d95cd58..f529cc56aa 100644 --- a/packages/api/test/account-api.e2e-spec.ts +++ b/packages/api/test/account-api.e2e-spec.ts @@ -4,7 +4,7 @@ import { getRepositoryToken } from "@nestjs/typeorm"; import * as request from "supertest"; import { Repository } from "typeorm"; import { BatchDetails } from "../src/batch/batchDetails.entity"; -import { BlockDetail } from "../src/block/blockDetail.entity"; +import { BlockDetails } from "../src/block/blockDetails.entity"; import { AddressTransaction } from "../src/transaction/entities/addressTransaction.entity"; import { Transaction } from "../src/transaction/entities/transaction.entity"; import { TransactionReceipt } from "../src/transaction/entities/transactionReceipt.entity"; @@ -23,7 +23,7 @@ describe("Account API (e2e)", () => { let addressTransferRepository: Repository; let transferRepository: Repository; let transactionReceiptRepository: Repository; - let blockRepository: Repository; + let blockRepository: Repository; let batchRepository: Repository; let tokenRepository: Repository; let balanceRepository: Repository; @@ -42,7 +42,7 @@ describe("Account API (e2e)", () => { addressTransferRepository = app.get>(getRepositoryToken(AddressTransfer)); transferRepository = app.get>(getRepositoryToken(Transfer)); transactionReceiptRepository = app.get>(getRepositoryToken(TransactionReceipt)); - blockRepository = app.get>(getRepositoryToken(BlockDetail)); + blockRepository = app.get>(getRepositoryToken(BlockDetails)); batchRepository = app.get>(getRepositoryToken(BatchDetails)); tokenRepository = app.get>(getRepositoryToken(Token)); balanceRepository = app.get>(getRepositoryToken(Balance)); diff --git a/packages/api/test/address.e2e-spec.ts b/packages/api/test/address.e2e-spec.ts index 68fc5ff46c..772878a9ee 100644 --- a/packages/api/test/address.e2e-spec.ts +++ b/packages/api/test/address.e2e-spec.ts @@ -7,7 +7,7 @@ import { AppModule } from "../src/app.module"; import { configureApp } from "../src/configureApp"; import { Address } from "../src/address/address.entity"; import { Balance } from "../src/balance/balance.entity"; -import { BlockDetail } from "../src/block/blockDetail.entity"; +import { BlockDetails } from "../src/block/blockDetails.entity"; import { Transaction } from "../src/transaction/entities/transaction.entity"; import { AddressTransaction } from "../src/transaction/entities/addressTransaction.entity"; import { TransactionReceipt } from "../src/transaction/entities/transactionReceipt.entity"; @@ -21,7 +21,7 @@ import { AddressTransfer } from "../src/transfer/addressTransfer.entity"; describe("AddressController (e2e)", () => { let app: INestApplication; let addressRepository: Repository
; - let blockRepository: Repository; + let blockRepository: Repository; let transactionRepository: Repository; let addressTransactionRepository: Repository; let transactionReceiptRepository: Repository; @@ -45,7 +45,7 @@ describe("AddressController (e2e)", () => { await app.init(); addressRepository = app.get>(getRepositoryToken(Address)); - blockRepository = app.get>(getRepositoryToken(BlockDetail)); + blockRepository = app.get>(getRepositoryToken(BlockDetails)); transactionRepository = app.get>(getRepositoryToken(Transaction)); addressTransactionRepository = app.get>(getRepositoryToken(AddressTransaction)); transactionReceiptRepository = app.get>(getRepositoryToken(TransactionReceipt)); diff --git a/packages/api/test/block-api.e2e-spec.ts b/packages/api/test/block-api.e2e-spec.ts index dab94a051e..c04f833be8 100644 --- a/packages/api/test/block-api.e2e-spec.ts +++ b/packages/api/test/block-api.e2e-spec.ts @@ -5,12 +5,12 @@ import { Repository } from "typeorm"; import { getRepositoryToken } from "@nestjs/typeorm"; import { AppModule } from "../src/app.module"; import { configureApp } from "../src/configureApp"; -import { BlockDetail } from "../src/block/blockDetail.entity"; +import { BlockDetails } from "../src/block/blockDetails.entity"; import { BatchDetails } from "../src/batch/batchDetails.entity"; describe("Block API (e2e)", () => { let app: INestApplication; - let blockRepository: Repository; + let blockRepository: Repository; let batchRepository: Repository; beforeAll(async () => { @@ -24,7 +24,7 @@ describe("Block API (e2e)", () => { await app.init(); - blockRepository = app.get>(getRepositoryToken(BlockDetail)); + blockRepository = app.get>(getRepositoryToken(BlockDetails)); batchRepository = app.get>(getRepositoryToken(BatchDetails)); for (let i = 0; i < 9; i++) { diff --git a/packages/api/test/block.e2e-spec.ts b/packages/api/test/block.e2e-spec.ts index c2bcf91129..3cf78d81e8 100644 --- a/packages/api/test/block.e2e-spec.ts +++ b/packages/api/test/block.e2e-spec.ts @@ -5,12 +5,12 @@ import { Repository } from "typeorm"; import { getRepositoryToken } from "@nestjs/typeorm"; import { AppModule } from "../src/app.module"; import { configureApp } from "../src/configureApp"; -import { BlockDetail } from "../src/block/blockDetail.entity"; +import { BlockDetails } from "../src/block/blockDetails.entity"; import { BatchDetails } from "../src/batch/batchDetails.entity"; describe("BlockController (e2e)", () => { let app: INestApplication; - let blockRepository: Repository; + let blockRepository: Repository; let batchRepository: Repository; beforeAll(async () => { @@ -24,7 +24,7 @@ describe("BlockController (e2e)", () => { await app.init(); - blockRepository = app.get>(getRepositoryToken(BlockDetail)); + blockRepository = app.get>(getRepositoryToken(BlockDetails)); batchRepository = app.get>(getRepositoryToken(BatchDetails)); for (let i = 0; i < 9; i++) { diff --git a/packages/api/test/log-api.e2e-spec.ts b/packages/api/test/log-api.e2e-spec.ts index f81f801a1e..ad04223e9e 100644 --- a/packages/api/test/log-api.e2e-spec.ts +++ b/packages/api/test/log-api.e2e-spec.ts @@ -4,7 +4,7 @@ import { getRepositoryToken } from "@nestjs/typeorm"; import * as request from "supertest"; import { Repository } from "typeorm"; import { BatchDetails } from "../src/batch/batchDetails.entity"; -import { BlockDetail } from "../src/block/blockDetail.entity"; +import { BlockDetails } from "../src/block/blockDetails.entity"; import { Log } from "../src/log/log.entity"; import { Transaction } from "../src/transaction/entities/transaction.entity"; import { TransactionReceipt } from "../src/transaction/entities/transactionReceipt.entity"; @@ -15,7 +15,7 @@ describe("Logs API (e2e)", () => { let app: INestApplication; let transactionRepository: Repository; let transactionReceiptRepository: Repository; - let blockRepository: Repository; + let blockRepository: Repository; let batchRepository: Repository; let logRepository: Repository; @@ -30,7 +30,7 @@ describe("Logs API (e2e)", () => { transactionRepository = app.get>(getRepositoryToken(Transaction)); transactionReceiptRepository = app.get>(getRepositoryToken(TransactionReceipt)); - blockRepository = app.get>(getRepositoryToken(BlockDetail)); + blockRepository = app.get>(getRepositoryToken(BlockDetails)); batchRepository = app.get>(getRepositoryToken(BatchDetails)); logRepository = app.get>(getRepositoryToken(Log)); diff --git a/packages/api/test/stats-api.e2e-spec.ts b/packages/api/test/stats-api.e2e-spec.ts index d9fec2f445..c805e8648c 100644 --- a/packages/api/test/stats-api.e2e-spec.ts +++ b/packages/api/test/stats-api.e2e-spec.ts @@ -4,14 +4,14 @@ import { getRepositoryToken } from "@nestjs/typeorm"; import * as request from "supertest"; import { Repository } from "typeorm"; import { BatchDetails } from "../src/batch/batchDetails.entity"; -import { BlockDetail } from "../src/block/blockDetail.entity"; +import { BlockDetails } from "../src/block/blockDetails.entity"; import { Token, ETH_TOKEN } from "../src/token/token.entity"; import { AppModule } from "../src/app.module"; import { configureApp } from "../src/configureApp"; describe("Stats API (e2e)", () => { let app: INestApplication; - let blockRepository: Repository; + let blockRepository: Repository; let batchRepository: Repository; let tokenRepository: Repository; @@ -24,7 +24,7 @@ describe("Stats API (e2e)", () => { configureApp(app); await app.init(); - blockRepository = app.get>(getRepositoryToken(BlockDetail)); + blockRepository = app.get>(getRepositoryToken(BlockDetails)); batchRepository = app.get>(getRepositoryToken(BatchDetails)); tokenRepository = app.get>(getRepositoryToken(Token)); diff --git a/packages/api/test/stats.e2e-spec.ts b/packages/api/test/stats.e2e-spec.ts index 291ce881dc..4666a6e379 100644 --- a/packages/api/test/stats.e2e-spec.ts +++ b/packages/api/test/stats.e2e-spec.ts @@ -6,14 +6,14 @@ import { getRepositoryToken } from "@nestjs/typeorm"; import { AppModule } from "../src/app.module"; import { configureApp } from "../src/configureApp"; import { BatchDetails } from "../src/batch/batchDetails.entity"; -import { BlockDetail } from "../src/block/blockDetail.entity"; +import { BlockDetails } from "../src/block/blockDetails.entity"; import { Transaction } from "../src/transaction/entities/transaction.entity"; import { Counter } from "../src/counter/counter.entity"; describe("StatsController (e2e)", () => { let app: INestApplication; let batchRepository: Repository; - let blockRepository: Repository; + let blockRepository: Repository; let transactionRepository: Repository; let counterRepository: Repository; @@ -29,7 +29,7 @@ describe("StatsController (e2e)", () => { await app.init(); batchRepository = app.get>(getRepositoryToken(BatchDetails)); - blockRepository = app.get>(getRepositoryToken(BlockDetail)); + blockRepository = app.get>(getRepositoryToken(BlockDetails)); transactionRepository = app.get>(getRepositoryToken(Transaction)); counterRepository = app.get>(getRepositoryToken(Counter)); diff --git a/packages/api/test/token-api.e2e-spec.ts b/packages/api/test/token-api.e2e-spec.ts index ce825b8535..f3735bc8e2 100644 --- a/packages/api/test/token-api.e2e-spec.ts +++ b/packages/api/test/token-api.e2e-spec.ts @@ -4,14 +4,14 @@ import { getRepositoryToken } from "@nestjs/typeorm"; import * as request from "supertest"; import { Repository } from "typeorm"; import { BatchDetails } from "../src/batch/batchDetails.entity"; -import { BlockDetail } from "../src/block/blockDetail.entity"; +import { BlockDetails } from "../src/block/blockDetails.entity"; import { Token, ETH_TOKEN } from "../src/token/token.entity"; import { AppModule } from "../src/app.module"; import { configureApp } from "../src/configureApp"; describe("Token API (e2e)", () => { let app: INestApplication; - let blockRepository: Repository; + let blockRepository: Repository; let batchRepository: Repository; let tokenRepository: Repository; @@ -24,7 +24,7 @@ describe("Token API (e2e)", () => { configureApp(app); await app.init(); - blockRepository = app.get>(getRepositoryToken(BlockDetail)); + blockRepository = app.get>(getRepositoryToken(BlockDetails)); batchRepository = app.get>(getRepositoryToken(BatchDetails)); tokenRepository = app.get>(getRepositoryToken(Token)); diff --git a/packages/api/test/token.e2e-spec.ts b/packages/api/test/token.e2e-spec.ts index 3ca44fae97..b307db3298 100644 --- a/packages/api/test/token.e2e-spec.ts +++ b/packages/api/test/token.e2e-spec.ts @@ -6,7 +6,7 @@ import { getRepositoryToken } from "@nestjs/typeorm"; import { AppModule } from "../src/app.module"; import { configureApp } from "../src/configureApp"; import { Token, TokenType, ETH_TOKEN } from "../src/token/token.entity"; -import { BlockDetail } from "../src/block/blockDetail.entity"; +import { BlockDetails } from "../src/block/blockDetails.entity"; import { Transaction } from "../src/transaction/entities/transaction.entity"; import { Transfer, TransferType } from "../src/transfer/transfer.entity"; import { BatchDetails } from "../src/batch/batchDetails.entity"; @@ -14,7 +14,7 @@ import { BatchDetails } from "../src/batch/batchDetails.entity"; describe("TokenController (e2e)", () => { let app: INestApplication; let tokenRepository: Repository; - let blockRepository: Repository; + let blockRepository: Repository; let transactionRepository: Repository; let transferRepository: Repository; let batchRepository: Repository; @@ -31,7 +31,7 @@ describe("TokenController (e2e)", () => { await app.init(); tokenRepository = app.get>(getRepositoryToken(Token)); - blockRepository = app.get>(getRepositoryToken(BlockDetail)); + blockRepository = app.get>(getRepositoryToken(BlockDetails)); transactionRepository = app.get>(getRepositoryToken(Transaction)); transferRepository = app.get>(getRepositoryToken(Transfer)); batchRepository = app.get>(getRepositoryToken(BatchDetails)); diff --git a/packages/api/test/transaction-api.e2e-spec.ts b/packages/api/test/transaction-api.e2e-spec.ts index 387de4330b..4fb83e5454 100644 --- a/packages/api/test/transaction-api.e2e-spec.ts +++ b/packages/api/test/transaction-api.e2e-spec.ts @@ -4,7 +4,7 @@ import { getRepositoryToken } from "@nestjs/typeorm"; import * as request from "supertest"; import { Repository } from "typeorm"; import { BatchDetails } from "../src/batch/batchDetails.entity"; -import { BlockDetail } from "../src/block/blockDetail.entity"; +import { BlockDetails } from "../src/block/blockDetails.entity"; import { Transaction } from "../src/transaction/entities/transaction.entity"; import { TransactionReceipt } from "../src/transaction/entities/transactionReceipt.entity"; import { AppModule } from "../src/app.module"; @@ -14,7 +14,7 @@ describe("Transaction API (e2e)", () => { let app: INestApplication; let transactionRepository: Repository; let transactionReceiptRepository: Repository; - let blockRepository: Repository; + let blockRepository: Repository; let batchRepository: Repository; beforeAll(async () => { @@ -28,7 +28,7 @@ describe("Transaction API (e2e)", () => { transactionRepository = app.get>(getRepositoryToken(Transaction)); transactionReceiptRepository = app.get>(getRepositoryToken(TransactionReceipt)); - blockRepository = app.get>(getRepositoryToken(BlockDetail)); + blockRepository = app.get>(getRepositoryToken(BlockDetails)); batchRepository = app.get>(getRepositoryToken(BatchDetails)); await batchRepository.insert({ diff --git a/packages/api/test/transaction.e2e-spec.ts b/packages/api/test/transaction.e2e-spec.ts index 4d43f69269..e38111a34d 100644 --- a/packages/api/test/transaction.e2e-spec.ts +++ b/packages/api/test/transaction.e2e-spec.ts @@ -7,7 +7,7 @@ import { getRepositoryToken } from "@nestjs/typeorm"; import { AppModule } from "../src/app.module"; import { configureApp } from "../src/configureApp"; import { Token, TokenType } from "../src/token/token.entity"; -import { BlockDetail } from "../src/block/blockDetail.entity"; +import { BlockDetails } from "../src/block/blockDetails.entity"; import { Transaction } from "../src/transaction/entities/transaction.entity"; import { TransactionReceipt } from "../src/transaction/entities/transactionReceipt.entity"; import { ETH_TOKEN } from "../src/token/token.entity"; @@ -19,7 +19,7 @@ import { BatchDetails } from "../src/batch/batchDetails.entity"; describe("TransactionController (e2e)", () => { let app: INestApplication; let tokenRepository: Repository; - let blockRepository: Repository; + let blockRepository: Repository; let transactionRepository: Repository; let transactionReceiptRepository: Repository; let addressTransactionRepository: Repository; @@ -39,7 +39,7 @@ describe("TransactionController (e2e)", () => { await app.init(); tokenRepository = app.get>(getRepositoryToken(Token)); - blockRepository = app.get>(getRepositoryToken(BlockDetail)); + blockRepository = app.get>(getRepositoryToken(BlockDetails)); transactionRepository = app.get>(getRepositoryToken(Transaction)); transactionReceiptRepository = app.get>(getRepositoryToken(TransactionReceipt)); addressTransactionRepository = app.get>(getRepositoryToken(AddressTransaction));