aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md2
-rw-r--r--package.json2
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts6
-rw-r--r--test/0x.js_test.ts6
-rw-r--r--test/exchange_wrapper_test.ts32
5 files changed, 25 insertions, 23 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2fdabfd92..16abcc0e9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,8 @@ v0.9.0 - TBD
------------------------
* Move `zeroEx.exchange.getAvailableContractAddressesAsync` to `zeroEx.getAvailableExchangeContractAddressesAsync` (#94)
* Move `zeroEx.exchange.getProxyAuthorizedContractAddressesAsync` to `zeroEx.getProxyAuthorizedExchangeContractAddressesAsync` (#94)
+ * Rename `zeroEx.exchange.batchCancelOrderAsync` to `zeroEx.exchange.batchCancelOrdersAsync`
+ * Rename `zeroEx.exchange.batchFillOrderAsync` to `zeroEx.exchange.batchFillOrdersAsync`
v0.8.0 - _Jul. 4, 2017_
------------------------
diff --git a/package.json b/package.json
index e8106b748..0ac014e76 100644
--- a/package.json
+++ b/package.json
@@ -85,7 +85,7 @@
"typedoc": "^0.7.1",
"typescript": "^2.3.3",
"web3-provider-engine": "^13.0.1",
- "web3-typescript-typings": "^0.0.10",
+ "web3-typescript-typings": "^0.0.11",
"webpack": "^3.1.0"
},
"dependencies": {
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts
index 2353c826a..fa4b5904b 100644
--- a/src/contract_wrappers/exchange_wrapper.ts
+++ b/src/contract_wrappers/exchange_wrapper.ts
@@ -297,8 +297,8 @@ export class ExchangeWrapper extends ContractWrapper {
* Must be available via the supplied Web3.Provider passed to 0x.js.
*/
@decorators.contractCallErrorHandler
- public async batchFillOrderAsync(orderFillRequests: OrderFillRequest[],
- shouldCheckTransfer: boolean, takerAddress: string): Promise<void> {
+ public async batchFillOrdersAsync(orderFillRequests: OrderFillRequest[],
+ shouldCheckTransfer: boolean, takerAddress: string): Promise<void> {
assert.doesConformToSchema('orderFillRequests', orderFillRequests, orderFillRequestsSchema);
const exchangeContractAddresses = _.map(
orderFillRequests,
@@ -520,7 +520,7 @@ export class ExchangeWrapper extends ContractWrapper {
* interface.
*/
@decorators.contractCallErrorHandler
- public async batchCancelOrderAsync(orderCancellationRequests: OrderCancellationRequest[]): Promise<void> {
+ public async batchCancelOrdersAsync(orderCancellationRequests: OrderCancellationRequest[]): Promise<void> {
assert.doesConformToSchema('orderCancellationRequests', orderCancellationRequests,
orderCancellationRequestsSchema);
const exchangeContractAddresses = _.map(
diff --git a/test/0x.js_test.ts b/test/0x.js_test.ts
index 0d8d63985..f25f104bd 100644
--- a/test/0x.js_test.ts
+++ b/test/0x.js_test.ts
@@ -163,7 +163,7 @@ describe('ZeroEx library', () => {
_.each(stubs, s => s.restore());
stubs = [];
});
- it ('Should return the correct ECSignature on TestPRC nodeVersion', async () => {
+ it('Should return the correct ECSignature on TestPRC nodeVersion', async () => {
const orderHash = '0x6927e990021d23b1eb7b8789f6a6feaf98fe104bb0cf8259421b79f9a34222b0';
const expectedECSignature = {
v: 27,
@@ -173,7 +173,7 @@ describe('ZeroEx library', () => {
const ecSignature = await zeroEx.signOrderHashAsync(orderHash, makerAddress);
expect(ecSignature).to.deep.equal(expectedECSignature);
});
- it ('should return the correct ECSignature on Parity > V1.6.6', async () => {
+ it('should return the correct ECSignature on Parity > V1.6.6', async () => {
const newParityNodeVersion = 'Parity//v1.6.7-beta-e128418-20170518/x86_64-macos/rustc1.17.0';
const orderHash = '0x34decbedc118904df65f379a175bb39ca18209d6ce41d5ed549d54e6e0a95004';
// tslint:disable-next-line: max-line-length
@@ -194,7 +194,7 @@ describe('ZeroEx library', () => {
const ecSignature = await zeroEx.signOrderHashAsync(orderHash, makerAddress);
expect(ecSignature).to.deep.equal(expectedECSignature);
});
- it ('should return the correct ECSignature on Parity < V1.6.6', async () => {
+ it('should return the correct ECSignature on Parity < V1.6.6', async () => {
const newParityNodeVersion = 'Parity//v1.6.6-beta-8c6e3f3-20170411/x86_64-macos/rustc1.16.0';
const orderHash = '0xc793e33ffded933b76f2f48d9aa3339fc090399d5e7f5dec8d3660f5480793f7';
// tslint:disable-next-line: max-line-length
diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts
index 45da44f54..53032efd6 100644
--- a/test/exchange_wrapper_test.ts
+++ b/test/exchange_wrapper_test.ts
@@ -386,7 +386,7 @@ describe('ExchangeWrapper', () => {
});
});
});
- describe('#batchFillOrderAsync', () => {
+ describe('#batchFillOrdersAsync', () => {
let signedOrder: SignedOrder;
let signedOrderHashHex: string;
let anotherSignedOrder: SignedOrder;
@@ -414,10 +414,10 @@ describe('ExchangeWrapper', () => {
});
describe('successful batch fills', () => {
it('should no-op for an empty batch', async () => {
- await zeroEx.exchange.batchFillOrderAsync([], shouldCheckTransfer, takerAddress);
+ await zeroEx.exchange.batchFillOrdersAsync([], shouldCheckTransfer, takerAddress);
});
it('should successfully fill multiple orders', async () => {
- await zeroEx.exchange.batchFillOrderAsync(orderFillBatch, shouldCheckTransfer, takerAddress);
+ await zeroEx.exchange.batchFillOrdersAsync(orderFillBatch, shouldCheckTransfer, takerAddress);
const filledAmount = await zeroEx.exchange.getFilledTakerAmountAsync(
signedOrderHashHex, exchangeContractAddress,
);
@@ -531,7 +531,7 @@ describe('ExchangeWrapper', () => {
});
});
});
- describe('#batchCancelOrderAsync', () => {
+ describe('#batchCancelOrdersAsync', () => {
let anotherSignedOrder: SignedOrder;
let anotherOrderHashHex: string;
let cancelBatch: OrderCancellationRequest[];
@@ -556,7 +556,7 @@ describe('ExchangeWrapper', () => {
const signedOrderWithDifferentMaker = await fillScenarios.createFillableSignedOrderAsync(
makerTokenAddress, takerTokenAddress, takerAddress, takerAddress, fillableAmount,
);
- return expect(zeroEx.exchange.batchCancelOrderAsync([
+ return expect(zeroEx.exchange.batchCancelOrdersAsync([
cancelBatch[0],
{
order: signedOrderWithDifferentMaker,
@@ -567,7 +567,7 @@ describe('ExchangeWrapper', () => {
});
describe('successful batch cancels', () => {
it('should cancel a batch of orders', async () => {
- await zeroEx.exchange.batchCancelOrderAsync(cancelBatch);
+ await zeroEx.exchange.batchCancelOrdersAsync(cancelBatch);
const cancelledAmount = await zeroEx.exchange.getCanceledTakerAmountAsync(
orderHashHex, exchangeContractAddress,
);
@@ -603,19 +603,19 @@ describe('ExchangeWrapper', () => {
orderHash = zeroEx.getOrderHashHex(signedOrder);
});
describe('#getUnavailableTakerAmountAsync', () => {
- it ('should throw if passed an invalid orderHash', async () => {
+ it('should throw if passed an invalid orderHash', async () => {
const invalidOrderHashHex = '0x123';
return expect(zeroEx.exchange.getUnavailableTakerAmountAsync(
invalidOrderHashHex, exchangeContractAddress,
)).to.be.rejected();
});
- it ('should return zero if passed a valid but non-existent orderHash', async () => {
+ it('should return zero if passed a valid but non-existent orderHash', async () => {
const unavailableValueT = await zeroEx.exchange.getUnavailableTakerAmountAsync(
NON_EXISTENT_ORDER_HASH, exchangeContractAddress,
);
expect(unavailableValueT).to.be.bignumber.equal(0);
});
- it ('should return the unavailableValueT for a valid and partially filled orderHash', async () => {
+ it('should return the unavailableValueT for a valid and partially filled orderHash', async () => {
const unavailableValueT = await zeroEx.exchange.getUnavailableTakerAmountAsync(
orderHash, exchangeContractAddress,
);
@@ -623,19 +623,19 @@ describe('ExchangeWrapper', () => {
});
});
describe('#getFilledTakerAmountAsync', () => {
- it ('should throw if passed an invalid orderHash', async () => {
+ it('should throw if passed an invalid orderHash', async () => {
const invalidOrderHashHex = '0x123';
return expect(zeroEx.exchange.getFilledTakerAmountAsync(
invalidOrderHashHex, exchangeContractAddress,
)).to.be.rejected();
});
- it ('should return zero if passed a valid but non-existent orderHash', async () => {
+ it('should return zero if passed a valid but non-existent orderHash', async () => {
const filledValueT = await zeroEx.exchange.getFilledTakerAmountAsync(
NON_EXISTENT_ORDER_HASH, exchangeContractAddress,
);
expect(filledValueT).to.be.bignumber.equal(0);
});
- it ('should return the filledValueT for a valid and partially filled orderHash', async () => {
+ it('should return the filledValueT for a valid and partially filled orderHash', async () => {
const filledValueT = await zeroEx.exchange.getFilledTakerAmountAsync(
orderHash, exchangeContractAddress,
);
@@ -643,25 +643,25 @@ describe('ExchangeWrapper', () => {
});
});
describe('#getCanceledTakerAmountAsync', () => {
- it ('should throw if passed an invalid orderHash', async () => {
+ it('should throw if passed an invalid orderHash', async () => {
const invalidOrderHashHex = '0x123';
return expect(zeroEx.exchange.getCanceledTakerAmountAsync(
invalidOrderHashHex, exchangeContractAddress,
)).to.be.rejected();
});
- it ('should return zero if passed a valid but non-existent orderHash', async () => {
+ it('should return zero if passed a valid but non-existent orderHash', async () => {
const cancelledValueT = await zeroEx.exchange.getCanceledTakerAmountAsync(
NON_EXISTENT_ORDER_HASH, exchangeContractAddress,
);
expect(cancelledValueT).to.be.bignumber.equal(0);
});
- it ('should return the cancelledValueT for a valid and partially filled orderHash', async () => {
+ it('should return the cancelledValueT for a valid and partially filled orderHash', async () => {
const cancelledValueT = await zeroEx.exchange.getCanceledTakerAmountAsync(
orderHash, exchangeContractAddress,
);
expect(cancelledValueT).to.be.bignumber.equal(0);
});
- it ('should return the cancelledValueT for a valid and cancelled orderHash', async () => {
+ it('should return the cancelledValueT for a valid and cancelled orderHash', async () => {
const cancelAmount = fillableAmount.minus(partialFillAmount);
await zeroEx.exchange.cancelOrderAsync(signedOrder, cancelAmount);
const cancelledValueT = await zeroEx.exchange.getCanceledTakerAmountAsync(