Remove moved RevertErrors
This commit is contained in:
@@ -7,7 +7,7 @@ export {
|
||||
LibCoordinatorRichErrorsContract,
|
||||
LibEIP712CoordinatorDomainContract,
|
||||
} from './wrappers';
|
||||
export import CoordinatorRevertErrors = require('./revert_errors');
|
||||
export { CoordinatorRevertErrors } from '@0x/utils';
|
||||
export { CoordinatorServerCancellationResponse } from './client/index';
|
||||
export { ApprovalFactory } from './approval_factory';
|
||||
export { SignedCoordinatorApproval } from './types';
|
||||
|
@@ -1,52 +0,0 @@
|
||||
import { BigNumber, RevertError } from '@0x/utils';
|
||||
|
||||
// tslint:disable:max-classes-per-file
|
||||
|
||||
export enum SignatureErrorCodes {
|
||||
InvalidLength,
|
||||
Unsupported,
|
||||
Illegal,
|
||||
Invalid,
|
||||
}
|
||||
|
||||
export class SignatureError extends RevertError {
|
||||
constructor(errorCode?: SignatureErrorCodes, hash?: string, signature?: string) {
|
||||
super('SignatureError', 'SignatureError(uint8 errorCode, bytes32 hash, bytes signature)', {
|
||||
errorCode,
|
||||
hash,
|
||||
signature,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export class InvalidOriginError extends RevertError {
|
||||
constructor(expectedOrigin?: string) {
|
||||
super('InvalidOriginError', 'InvalidOriginError(address expectedOrigin)', { expectedOrigin });
|
||||
}
|
||||
}
|
||||
|
||||
export class ApprovalExpiredError extends RevertError {
|
||||
constructor(transactionHash?: string, approvalExpirationTime?: BigNumber | number | string) {
|
||||
super('ApprovalExpiredError', 'ApprovalExpiredError(bytes32 transactionHash, uint256 approvalExpirationTime)', {
|
||||
transactionHash,
|
||||
approvalExpirationTime,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export class InvalidApprovalSignatureError extends RevertError {
|
||||
constructor(transactionHash?: string, approverAddress?: string) {
|
||||
super(
|
||||
'InvalidApprovalSignatureError',
|
||||
'InvalidApprovalSignatureError(bytes32 transactionHash, address approverAddress)',
|
||||
{ transactionHash, approverAddress },
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const types = [SignatureError, InvalidOriginError, ApprovalExpiredError, InvalidApprovalSignatureError];
|
||||
|
||||
// Register the types we've defined.
|
||||
for (const type of types) {
|
||||
RevertError.registerType(type);
|
||||
}
|
@@ -12,9 +12,7 @@ import {
|
||||
} from '@0x/contracts-test-utils';
|
||||
import { LibBytesRevertErrors } from '@0x/contracts-utils';
|
||||
import { SignatureType, SignedOrder } from '@0x/types';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
|
||||
import CoordinatorRevertErrors = require('../src/revert_errors');
|
||||
import { BigNumber, CoordinatorRevertErrors } from '@0x/utils';
|
||||
|
||||
import { ApprovalFactory } from '../src/approval_factory';
|
||||
|
||||
|
Reference in New Issue
Block a user