From 1aa3f9d69f7a6570c6fa62c542063fa92fc0bf5a Mon Sep 17 00:00:00 2001 From: Jake Ellowitz Date: Mon, 26 Nov 2018 14:55:45 -0800 Subject: updating comment for 0x trusted tokens --- .../migrations/1542655823221-NewMetadataAndOHLCVTables.ts | 6 +----- packages/pipeline/src/parsers/token_metadata/index.ts | 4 +--- packages/pipeline/src/scripts/pull_trusted_tokens.ts | 9 +++++---- packages/pipeline/src/utils/index.ts | 2 +- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/packages/pipeline/migrations/1542655823221-NewMetadataAndOHLCVTables.ts b/packages/pipeline/migrations/1542655823221-NewMetadataAndOHLCVTables.ts index 8d131271b..838f5ba9c 100644 --- a/packages/pipeline/migrations/1542655823221-NewMetadataAndOHLCVTables.ts +++ b/packages/pipeline/migrations/1542655823221-NewMetadataAndOHLCVTables.ts @@ -1,10 +1,8 @@ -import {MigrationInterface, QueryRunner} from 'typeorm'; +import { MigrationInterface, QueryRunner } from 'typeorm'; export class NewMetadataAndOHLCVTables1542655823221 implements MigrationInterface { - // tslint:disable-next-line public async up(queryRunner: QueryRunner): Promise { - await queryRunner.query(` CREATE TABLE raw.token_metadata ( address VARCHAR NOT NULL, @@ -44,7 +42,6 @@ export class NewMetadataAndOHLCVTables1542655823221 implements MigrationInterfac // tslint:disable-next-line public async down(queryRunner: QueryRunner): Promise { - await queryRunner.query(` CREATE TABLE raw.token_on_chain_metadata ( address VARCHAR NOT NULL, @@ -60,5 +57,4 @@ export class NewMetadataAndOHLCVTables1542655823221 implements MigrationInterfac await queryRunner.dropTable('raw.ohlcv_external'); } - } diff --git a/packages/pipeline/src/parsers/token_metadata/index.ts b/packages/pipeline/src/parsers/token_metadata/index.ts index d09def0db..916448cb3 100644 --- a/packages/pipeline/src/parsers/token_metadata/index.ts +++ b/packages/pipeline/src/parsers/token_metadata/index.ts @@ -14,14 +14,13 @@ export function parseMetamaskTrustedTokens(rawResp: Map { // tslint:disable-next-line console.log('Getting latest metamask trusted tokens list ...'); const trustedTokensRepository = connection.getRepository(TokenMetadata); - const trustedTokensSource = new TrustedTokenSource>(METAMASK_TRUSTED_TOKENS_URL); + const trustedTokensSource = new TrustedTokenSource>( + METAMASK_TRUSTED_TOKENS_URL, + ); const resp = await trustedTokensSource.getTrustedTokenMetaAsync(); const trustedTokens = parseMetamaskTrustedTokens(resp); // tslint:disable-next-line console.log('Saving metamask trusted tokens list'); await trustedTokensRepository.save(trustedTokens); // tslint:disable-next-line - console.log('Done saving metamask trusted tokens.') + console.log('Done saving metamask trusted tokens.'); } async function getZeroExTrustedTokens(): Promise { diff --git a/packages/pipeline/src/utils/index.ts b/packages/pipeline/src/utils/index.ts index 732c259d7..b6d84a565 100644 --- a/packages/pipeline/src/utils/index.ts +++ b/packages/pipeline/src/utils/index.ts @@ -56,5 +56,5 @@ export const bigNumberTransformer = new BigNumberTransformer(); export function getHourInUnixTime(): number { const currentTime: number = Date.now(); // tslint:disable-next-line - return currentTime - (currentTime % (3600 * 1000)); + return currentTime - currentTime % (3600 * 1000); } -- cgit v1.2.3