Ran yarn prettier
This commit is contained in:
committed by
Amir Bandeali
parent
b7adf59ed5
commit
03ea97734c
@@ -48,9 +48,7 @@ describe('Authorizable', () => {
|
||||
describe('addAuthorizedAddress', () => {
|
||||
it('should throw if not called by owner', async () => {
|
||||
const expectedError = new OwnableRevertErrors.OnlyOwnerError(notOwner, owner);
|
||||
const tx = authorizable.addAuthorizedAddress.sendTransactionAsync(
|
||||
notOwner, { from: notOwner }
|
||||
);
|
||||
const tx = authorizable.addAuthorizedAddress.sendTransactionAsync(notOwner, { from: notOwner });
|
||||
expect(tx).to.revertWith(expectedError);
|
||||
});
|
||||
it('should allow owner to add an authorized address', async () => {
|
||||
@@ -83,9 +81,7 @@ describe('Authorizable', () => {
|
||||
constants.AWAIT_TRANSACTION_MINED_MS,
|
||||
);
|
||||
const expectedError = new OwnableRevertErrors.OnlyOwnerError(notOwner, owner);
|
||||
const tx = authorizable.removeAuthorizedAddress.sendTransactionAsync(
|
||||
address, { from: notOwner, }
|
||||
);
|
||||
const tx = authorizable.removeAuthorizedAddress.sendTransactionAsync(address, { from: notOwner });
|
||||
expect(tx).to.revertWith(expectedError);
|
||||
});
|
||||
|
||||
@@ -123,9 +119,9 @@ describe('Authorizable', () => {
|
||||
);
|
||||
const index = new BigNumber(0);
|
||||
const expectedError = new OwnableRevertErrors.OnlyOwnerError(notOwner, owner);
|
||||
const tx = authorizable.removeAuthorizedAddressAtIndex.sendTransactionAsync(
|
||||
address, index, { from: notOwner, }
|
||||
);
|
||||
const tx = authorizable.removeAuthorizedAddressAtIndex.sendTransactionAsync(address, index, {
|
||||
from: notOwner,
|
||||
});
|
||||
expect(tx).to.revertWith(expectedError);
|
||||
});
|
||||
it('should throw if index is >= authorities.length', async () => {
|
||||
|
@@ -1832,7 +1832,7 @@ describe('ERC1155Proxy', () => {
|
||||
const expectedInitialBalances = [spenderInitialFungibleBalance, receiverInitialFungibleBalance];
|
||||
await erc1155Wrapper.assertBalancesAsync(tokenHolders, tokensToTransfer, expectedInitialBalances);
|
||||
const expectedError = new SafeMathRevertErrors.Uint256UnderflowError(
|
||||
spenderInitialFungibleBalance,
|
||||
spenderInitialFungibleBalance,
|
||||
valuesToTransfer[0],
|
||||
);
|
||||
// execute transfer
|
||||
|
@@ -143,10 +143,7 @@ describe('AssetProxyDispatcher', () => {
|
||||
});
|
||||
|
||||
it('should throw if requesting address is not owner', async () => {
|
||||
const expectedError = new OwnableRevertErrors.OnlyOwnerError(
|
||||
notOwner,
|
||||
owner,
|
||||
);
|
||||
const expectedError = new OwnableRevertErrors.OnlyOwnerError(notOwner, owner);
|
||||
const tx = assetProxyDispatcher.registerAssetProxy.sendTransactionAsync(erc20Proxy.address, {
|
||||
from: notOwner,
|
||||
});
|
||||
|
@@ -50,17 +50,15 @@ const emptySignedOrder: SignedOrder = {
|
||||
signature: '',
|
||||
};
|
||||
|
||||
const overflowErrorForCall = (
|
||||
a?: BigNumber | number | string,
|
||||
b?: BigNumber | number | string,
|
||||
) => new SafeMathRevertErrors.Uint256OverflowError(a, b);
|
||||
const overflowErrorForCall = (a?: BigNumber | number | string, b?: BigNumber | number | string) =>
|
||||
new SafeMathRevertErrors.Uint256OverflowError(a, b);
|
||||
|
||||
describe('Exchange core internal functions', () => {
|
||||
let chainId: number;
|
||||
let testExchange: TestExchangeInternalsContract;
|
||||
let overflowErrorForSendTransaction: (
|
||||
a?: BigNumber | number | string,
|
||||
b?: BigNumber | number | string,
|
||||
a?: BigNumber | number | string,
|
||||
b?: BigNumber | number | string,
|
||||
) => Error | undefined;
|
||||
let divisionByZeroErrorForCall: Error | undefined;
|
||||
let roundingErrorForCall: Error | undefined;
|
||||
|
@@ -1,4 +1,3 @@
|
||||
import { BigNumber } from './configured_bignumber';
|
||||
import { RevertError } from './revert_error';
|
||||
|
||||
export class OnlyOwnerError extends RevertError {
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import { BigNumber } from './configured_bignumber';
|
||||
import { RevertError } from './revert_error';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
// tslint:disable:max-classes-per-file
|
||||
|
||||
@@ -22,10 +21,7 @@ export class Uint256UnderflowError extends RevertError {
|
||||
}
|
||||
}
|
||||
|
||||
const types = [
|
||||
Uint256OverflowError,
|
||||
Uint256UnderflowError,
|
||||
];
|
||||
const types = [Uint256OverflowError, Uint256UnderflowError];
|
||||
|
||||
// Register the types we've defined.
|
||||
for (const type of types) {
|
||||
|
Reference in New Issue
Block a user