From 07398c87cfa66eed6132f6398c01505b566e5913 Mon Sep 17 00:00:00 2001 From: Lawrence Forman Date: Wed, 4 Sep 2019 15:11:55 -0400 Subject: [PATCH] `@0x/utils`: Remove redundant `FixedMath` prefix from `FixedMath` `RevertError` types. --- packages/utils/src/fixed_math_revert_errors.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/utils/src/fixed_math_revert_errors.ts b/packages/utils/src/fixed_math_revert_errors.ts index 7b3f592453..b405653e6d 100644 --- a/packages/utils/src/fixed_math_revert_errors.ts +++ b/packages/utils/src/fixed_math_revert_errors.ts @@ -15,27 +15,27 @@ export enum BinOpErrorCodes { DivisionByZero, } -export class FixedMathSignedValueError extends RevertError { +export class SignedValueError extends RevertError { constructor(error?: ValueErrorCodes, n?: BigNumber | number | string) { - super('FixedMathSignedValueError', 'FixedMathSignedValueError(uint8 error, int256 n)', { + super('SignedValueError', 'SignedValueError(uint8 error, int256 n)', { error, n, }); } } -export class FixedMathUnsignedValueError extends RevertError { +export class UnsignedValueError extends RevertError { constructor(error?: ValueErrorCodes, n?: BigNumber | number | string) { - super('FixedMathUnsignedValueError', 'FixedMathUnsignedValueError(uint8 error, uint256 n)', { + super('UnsignedValueError', 'UnsignedValueError(uint8 error, uint256 n)', { error, n, }); } } -export class FixedMathBinOpError extends RevertError { +export class BinOpError extends RevertError { constructor(error?: BinOpErrorCodes, a?: BigNumber | number | string, b?: BigNumber | number | string) { - super('FixedMathBinOpError', 'FixedMathBinOpError(uint8 error, int256 a, int256 b)', { + super('BinOpError', 'BinOpError(uint8 error, int256 a, int256 b)', { error, a, b, @@ -43,7 +43,7 @@ export class FixedMathBinOpError extends RevertError { } } -const types = [FixedMathSignedValueError, FixedMathUnsignedValueError, FixedMathBinOpError]; +const types = [SignedValueError, UnsignedValueError, BinOpError]; // Register the types we've defined. for (const type of types) {