aboutsummaryrefslogtreecommitdiffstats
path: root/packages/pipeline/src/scripts
diff options
context:
space:
mode:
authorJake Ellowitz <jake.ellowitz@gmail.com>2018-11-20 11:11:51 +0800
committerFred Carlsen <fred@sjelfull.no>2018-12-06 19:04:25 +0800
commit72c45d9ea90237d87053fd1ddc751fc699527937 (patch)
tree140a9b62ec450fa2cfb2ac39c90265638ab2ce0c /packages/pipeline/src/scripts
parent75df8a0e8b375f198555f55bd6ed47af75c2b043 (diff)
downloaddexon-0x-contracts-72c45d9ea90237d87053fd1ddc751fc699527937.tar.gz
dexon-0x-contracts-72c45d9ea90237d87053fd1ddc751fc699527937.tar.zst
dexon-0x-contracts-72c45d9ea90237d87053fd1ddc751fc699527937.zip
metadata and trusted sources in same raw table
Diffstat (limited to 'packages/pipeline/src/scripts')
-rw-r--r--packages/pipeline/src/scripts/pull_trusted_tokens.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/pipeline/src/scripts/pull_trusted_tokens.ts b/packages/pipeline/src/scripts/pull_trusted_tokens.ts
index 67d9e08d1..48e20bea7 100644
--- a/packages/pipeline/src/scripts/pull_trusted_tokens.ts
+++ b/packages/pipeline/src/scripts/pull_trusted_tokens.ts
@@ -2,9 +2,9 @@ import 'reflect-metadata';
import { Connection, ConnectionOptions, createConnection } from 'typeorm';
import { MetamaskTrustedTokenMeta, TrustedTokenSource, ZeroExTrustedTokenMeta } from '../data_sources/trusted_tokens';
-import { TrustedToken } from '../entities';
+import { TokenMetadata } from '../entities';
import * as ormConfig from '../ormconfig';
-import { parseMetamaskTrustedTokens, parseZeroExTrustedTokens } from '../parsers/trusted_tokens';
+import { parseMetamaskTrustedTokens, parseZeroExTrustedTokens } from '../parsers/token_metadata';
import { handleError } from '../utils';
const METAMASK_TRUSTED_TOKENS_URL =
@@ -25,7 +25,7 @@ let connection: Connection;
async function getMetamaskTrustedTokens(): Promise<void> {
// tslint:disable-next-line
console.log('Getting latest metamask trusted tokens list ...');
- const trustedTokensRepository = connection.getRepository(TrustedToken);
+ const trustedTokensRepository = connection.getRepository(TokenMetadata);
const trustedTokensSource = new TrustedTokenSource<Map<string, MetamaskTrustedTokenMeta>>(METAMASK_TRUSTED_TOKENS_URL);
const resp = await trustedTokensSource.getTrustedTokenMetaAsync();
const trustedTokens = parseMetamaskTrustedTokens(resp);
@@ -39,7 +39,7 @@ async function getMetamaskTrustedTokens(): Promise<void> {
async function getZeroExTrustedTokens(): Promise<void> {
// tslint:disable-next-line
console.log('Getting latest 0x trusted tokens list ...');
- const trustedTokensRepository = connection.getRepository(TrustedToken);
+ const trustedTokensRepository = connection.getRepository(TokenMetadata);
const trustedTokensSource = new TrustedTokenSource<ZeroExTrustedTokenMeta[]>(ZEROEX_TRUSTED_TOKENS_URL);
const resp = await trustedTokensSource.getTrustedTokenMetaAsync();
const trustedTokens = parseZeroExTrustedTokens(resp);