From bf844098392cfd08af419b01b25331b50ada286d Mon Sep 17 00:00:00 2001 From: Lawrence Forman Date: Thu, 28 May 2020 11:55:07 -0400 Subject: [PATCH] `@0x/utils`: Update `InvalidTransformDataError`. --- .../zero-ex/transform_erc20_revert_errors.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/utils/src/revert_errors/zero-ex/transform_erc20_revert_errors.ts b/packages/utils/src/revert_errors/zero-ex/transform_erc20_revert_errors.ts index 7cd2d2b4f8..6852d3b505 100644 --- a/packages/utils/src/revert_errors/zero-ex/transform_erc20_revert_errors.ts +++ b/packages/utils/src/revert_errors/zero-ex/transform_erc20_revert_errors.ts @@ -75,9 +75,15 @@ export class InvalidExecutionContextError extends RevertError { } } +export enum InvalidTransformDataErrorCode { + InvalidTokens, + InvalidArrayLength, +} + export class InvalidTransformDataError extends RevertError { - constructor(transformData?: string) { - super('InvalidTransformDataError', 'InvalidTransformDataError(bytes transformData)', { + constructor(errorCode?: InvalidTransformDataErrorCode, transformData?: string) { + super('InvalidTransformDataError', 'InvalidTransformDataError(uint8 errorCode, bytes transformData)', { + errorCode, transformData, }); }