From 16c296be1461a3ccc76fbdf68e78d8c8ccd3ed83 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 2 Jun 2017 18:14:51 +0200 Subject: Add ZRX_TOKEN_NOT_IN_REGISTRY --- src/types.ts | 11 ++++++----- test/utils/token_utils.ts | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/types.ts b/src/types.ts index f58fa035c..3da24abc1 100644 --- a/src/types.ts +++ b/src/types.ts @@ -10,11 +10,12 @@ function strEnum(values: string[]): {[key: string]: string} { } export const ZeroExError = strEnum([ - 'CONTRACT_DOES_NOT_EXIST', - 'UNHANDLED_ERROR', - 'USER_HAS_NO_ASSOCIATED_ADDRESSES', - 'INVALID_SIGNATURE', - 'CONTRACT_NOT_DEPLOYED_ON_NETWORK', + 'CONTRACT_DOES_NOT_EXIST', + 'UNHANDLED_ERROR', + 'USER_HAS_NO_ASSOCIATED_ADDRESSES', + 'INVALID_SIGNATURE', + 'CONTRACT_NOT_DEPLOYED_ON_NETWORK', + 'ZRX_NOT_IN_TOKEN_REGISTRY', ]); export type ZeroExError = keyof typeof ZeroExError; diff --git a/test/utils/token_utils.ts b/test/utils/token_utils.ts index 11d334619..3d2faa959 100644 --- a/test/utils/token_utils.ts +++ b/test/utils/token_utils.ts @@ -11,7 +11,7 @@ export class TokenUtils { public getProtocolTokenOrThrow(): Token { const zrxToken = _.find(this.tokens, {symbol: PROTOCOL_TOKEN_SYMBOL}); if (_.isUndefined(zrxToken)) { - throw new Error(ZeroExError.CONTRACT_NOT_DEPLOYED_ON_NETWORK); + throw new Error(ZeroExError.ZRX_NOT_IN_TOKEN_REGISTRY); } return zrxToken; } -- cgit