diff options
author | Xianny <8582774+xianny@users.noreply.github.com> | 2018-12-11 07:08:13 +0800 |
---|---|---|
committer | Fred Carlsen <fred@sjelfull.no> | 2018-12-13 01:19:33 +0800 |
commit | 1dc67b2874ee9b58839afd63bb83ebd92e4f65df (patch) | |
tree | 239ca50e30c30ee20155735d8b4ff4be9c377ccb | |
parent | f09e5778852b5547b033f8ca79a8595c298e5668 (diff) | |
download | dexon-sol-tools-1dc67b2874ee9b58839afd63bb83ebd92e4f65df.tar.gz dexon-sol-tools-1dc67b2874ee9b58839afd63bb83ebd92e4f65df.tar.zst dexon-sol-tools-1dc67b2874ee9b58839afd63bb83ebd92e4f65df.zip |
perform null check on token metadata (#1412)
-rw-r--r-- | packages/pipeline/src/parsers/token_metadata/index.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/pipeline/src/parsers/token_metadata/index.ts b/packages/pipeline/src/parsers/token_metadata/index.ts index 3b3e05d76..f258af063 100644 --- a/packages/pipeline/src/parsers/token_metadata/index.ts +++ b/packages/pipeline/src/parsers/token_metadata/index.ts @@ -38,7 +38,7 @@ function parseZeroExTrustedToken(resp: ZeroExTrustedTokenMeta): TokenMetadata { const trustedToken = new TokenMetadata(); trustedToken.address = resp.address; - trustedToken.decimals = new BigNumber(resp.decimals); + trustedToken.decimals = resp.decimals ? new BigNumber(resp.decimals) : null; trustedToken.symbol = resp.symbol; trustedToken.name = resp.name; trustedToken.authority = '0x'; |