Ran prettier

This commit is contained in:
Greg Hysen 2019-03-07 08:57:30 -08:00
parent 9f2221a885
commit fea5a39740
4 changed files with 46 additions and 17 deletions

View File

@ -190,10 +190,16 @@ describe('Coordinator tests', () => {
const data = exchangeDataEncoder.encodeOrdersToExchangeData(fnName, orders);
const transaction = takerTransactionFactory.newSignedTransaction(data);
await expectTransactionFailedAsync(
coordinatorContract.executeTransaction.sendTransactionAsync(transaction, transaction.signature, [], [], {
coordinatorContract.executeTransaction.sendTransactionAsync(
transaction,
transaction.signature,
[],
[],
{
from: takerAddress,
gas: devConstants.MAX_EXECUTE_TRANSACTION_GAS,
}),
},
),
RevertReason.InvalidApprovalSignature,
);
});
@ -388,9 +394,15 @@ describe('Coordinator tests', () => {
const data = exchangeDataEncoder.encodeOrdersToExchangeData(constants.CANCEL_ORDERS, orders);
const transaction = makerTransactionFactory.newSignedTransaction(data);
const transactionReceipt = await web3Wrapper.awaitTransactionSuccessAsync(
await coordinatorContract.executeTransaction.sendTransactionAsync(transaction, transaction.signature, [], [], {
await coordinatorContract.executeTransaction.sendTransactionAsync(
transaction,
transaction.signature,
[],
[],
{
from: makerAddress,
}),
},
),
);
const cancelLogs = transactionReceipt.logs.filter(
log => (log as LogWithDecodedArgs<ExchangeCancelEventArgs>).event === 'Cancel',
@ -409,9 +421,15 @@ describe('Coordinator tests', () => {
const data = exchangeDataEncoder.encodeOrdersToExchangeData(constants.BATCH_CANCEL_ORDERS, orders);
const transaction = makerTransactionFactory.newSignedTransaction(data);
const transactionReceipt = await web3Wrapper.awaitTransactionSuccessAsync(
await coordinatorContract.executeTransaction.sendTransactionAsync(transaction, transaction.signature, [], [], {
await coordinatorContract.executeTransaction.sendTransactionAsync(
transaction,
transaction.signature,
[],
[],
{
from: makerAddress,
}),
},
),
);
const cancelLogs = transactionReceipt.logs.filter(
log => (log as LogWithDecodedArgs<ExchangeCancelEventArgs>).event === 'Cancel',
@ -432,9 +450,15 @@ describe('Coordinator tests', () => {
const data = exchangeDataEncoder.encodeOrdersToExchangeData(constants.CANCEL_ORDERS_UP_TO, orders);
const transaction = makerTransactionFactory.newSignedTransaction(data);
const transactionReceipt = await web3Wrapper.awaitTransactionSuccessAsync(
await coordinatorContract.executeTransaction.sendTransactionAsync(transaction, transaction.signature, [], [], {
await coordinatorContract.executeTransaction.sendTransactionAsync(
transaction,
transaction.signature,
[],
[],
{
from: makerAddress,
}),
},
),
);
const cancelLogs = transactionReceipt.logs.filter(
log => (log as LogWithDecodedArgs<ExchangeCancelUpToEventArgs>).event === 'CancelUpTo',

View File

@ -81,14 +81,20 @@ describe('Mixins tests', () => {
describe('getSignerAddress', () => {
it('should return the correct address using the EthSign signature type', async () => {
const data = devConstants.NULL_BYTES;
const transaction = transactionFactory.newSignedCoordinatorTransaction(data, CoordinatorSignatureType.EthSign);
const transaction = transactionFactory.newSignedCoordinatorTransaction(
data,
CoordinatorSignatureType.EthSign,
);
const transactionHash = hashUtils.getTransactionHashHex(transaction);
const signerAddress = await mixins.getSignerAddress.callAsync(transactionHash, transaction.signature);
expect(transaction.signerAddress).to.eq(signerAddress);
});
it('should return the correct address using the EIP712 signature type', async () => {
const data = devConstants.NULL_BYTES;
const transaction = transactionFactory.newSignedCoordinatorTransaction(data, CoordinatorSignatureType.EIP712);
const transaction = transactionFactory.newSignedCoordinatorTransaction(
data,
CoordinatorSignatureType.EIP712,
);
const transactionHash = hashUtils.getTransactionHashHex(transaction);
const signerAddress = await mixins.getSignerAddress.callAsync(transactionHash, transaction.signature);
expect(transaction.signerAddress).to.eq(signerAddress);

View File

@ -1,6 +1,5 @@
[
{
"version": "2.0.9",
"changes": [
{