Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
@0x/utils: Remove redundant FixedMath prefix from FixedMath `Re…
Browse files Browse the repository at this point in the history
…vertError` types.
  • Loading branch information
merklejerk committed Sep 4, 2019
1 parent 9192a2a commit 07398c8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/utils/src/fixed_math_revert_errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,35 @@ 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,
});
}
}

const types = [FixedMathSignedValueError, FixedMathUnsignedValueError, FixedMathBinOpError];
const types = [SignedValueError, UnsignedValueError, BinOpError];

// Register the types we've defined.
for (const type of types) {
Expand Down

0 comments on commit 07398c8

Please sign in to comment.