aboutsummaryrefslogtreecommitdiffstats
path: root/packages/pipeline/src/parsers/token_metadata
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-12-05 12:04:08 +0800
committerFred Carlsen <fred@sjelfull.no>2018-12-06 19:06:35 +0800
commit6742142ca567d49e2e67d0ab0f5fc55b1351ec7c (patch)
treee2d382e9bc652b67f1eef65d0f23a6086085cbfb /packages/pipeline/src/parsers/token_metadata
parentb7e06a2282bc8bd666a58f1458d37e12bd9e855d (diff)
downloaddexon-0x-contracts-6742142ca567d49e2e67d0ab0f5fc55b1351ec7c.tar
dexon-0x-contracts-6742142ca567d49e2e67d0ab0f5fc55b1351ec7c.tar.gz
dexon-0x-contracts-6742142ca567d49e2e67d0ab0f5fc55b1351ec7c.tar.bz2
dexon-0x-contracts-6742142ca567d49e2e67d0ab0f5fc55b1351ec7c.tar.lz
dexon-0x-contracts-6742142ca567d49e2e67d0ab0f5fc55b1351ec7c.tar.xz
dexon-0x-contracts-6742142ca567d49e2e67d0ab0f5fc55b1351ec7c.tar.zst
dexon-0x-contracts-6742142ca567d49e2e67d0ab0f5fc55b1351ec7c.zip
Address PR feedback
Diffstat (limited to 'packages/pipeline/src/parsers/token_metadata')
-rw-r--r--packages/pipeline/src/parsers/token_metadata/index.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/pipeline/src/parsers/token_metadata/index.ts b/packages/pipeline/src/parsers/token_metadata/index.ts
index 916448cb3..3b3e05d76 100644
--- a/packages/pipeline/src/parsers/token_metadata/index.ts
+++ b/packages/pipeline/src/parsers/token_metadata/index.ts
@@ -1,7 +1,9 @@
+import { BigNumber } from '@0x/utils';
import * as R from 'ramda';
import { MetamaskTrustedTokenMeta, ZeroExTrustedTokenMeta } from '../../data_sources/trusted_tokens';
import { TokenMetadata } from '../../entities';
+import {} from '../../utils';
/**
* Parses Metamask's trusted tokens list.
@@ -24,7 +26,7 @@ function parseMetamaskTrustedToken(resp: MetamaskTrustedTokenMeta, address: stri
const trustedToken = new TokenMetadata();
trustedToken.address = address;
- trustedToken.decimals = resp.decimals;
+ trustedToken.decimals = new BigNumber(resp.decimals);
trustedToken.symbol = resp.symbol;
trustedToken.name = resp.name;
trustedToken.authority = 'metamask';
@@ -36,7 +38,7 @@ function parseZeroExTrustedToken(resp: ZeroExTrustedTokenMeta): TokenMetadata {
const trustedToken = new TokenMetadata();
trustedToken.address = resp.address;
- trustedToken.decimals = resp.decimals;
+ trustedToken.decimals = new BigNumber(resp.decimals);
trustedToken.symbol = resp.symbol;
trustedToken.name = resp.name;
trustedToken.authority = '0x';