aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/src
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2017-11-15 01:29:46 +0800
committerBrandon Millman <brandon.millman@gmail.com>2017-11-15 01:29:46 +0800
commit9bb5e6f5ce199acde620a0fb8f36f585e1c763e9 (patch)
tree125f6d75b0e664208d5fef11694d9e982a932c45 /packages/0x.js/src
parent56b5619d24b44d23f770b58b0c9e1d4a63b89aca (diff)
parent05de07496fe3f9089b4c96b0594b234afc436304 (diff)
downloaddexon-sol-tools-9bb5e6f5ce199acde620a0fb8f36f585e1c763e9.tar
dexon-sol-tools-9bb5e6f5ce199acde620a0fb8f36f585e1c763e9.tar.gz
dexon-sol-tools-9bb5e6f5ce199acde620a0fb8f36f585e1c763e9.tar.bz2
dexon-sol-tools-9bb5e6f5ce199acde620a0fb8f36f585e1c763e9.tar.lz
dexon-sol-tools-9bb5e6f5ce199acde620a0fb8f36f585e1c763e9.tar.xz
dexon-sol-tools-9bb5e6f5ce199acde620a0fb8f36f585e1c763e9.tar.zst
dexon-sol-tools-9bb5e6f5ce199acde620a0fb8f36f585e1c763e9.zip
Merge branch 'development' into feature/addJsonSchemas
* development: Improve description Alphabetize Add exit 0 to 0x.js build command Add snapshot save and revert to order_state_watcher_test.ts Fix changelog Use tslint v5.8.0 everywhere and use the tslint-config sub-package instead of the old repo as a dep. in the rest of the sub-packages. Add tslint-config sub-package Fix tslint issue Public interface has changed, moved to minor version Update changelog Renamed canceled to cancelled
Diffstat (limited to 'packages/0x.js/src')
-rw-r--r--packages/0x.js/src/contract_wrappers/exchange_wrapper.ts4
-rw-r--r--packages/0x.js/src/stores/order_filled_cancelled_lazy_store.ts2
-rw-r--r--packages/0x.js/src/types.ts2
-rw-r--r--packages/0x.js/src/utils/abi_decoder.ts2
-rw-r--r--packages/0x.js/src/utils/order_state_utils.ts6
5 files changed, 8 insertions, 8 deletions
diff --git a/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts b/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts
index ef3cc0b16..3e631b73e 100644
--- a/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts
+++ b/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts
@@ -95,7 +95,7 @@ export class ExchangeWrapper extends ContractWrapper {
* @param orderHash The hex encoded orderHash for which you would like to retrieve the
* unavailable takerAmount.
* @param methodOpts Optional arguments this method accepts.
- * @return The amount of the order (in taker tokens) that has either been filled or canceled.
+ * @return The amount of the order (in taker tokens) that has either been filled or cancelled.
*/
public async getUnavailableTakerAmountAsync(orderHash: string,
methodOpts?: MethodOpts): Promise<BigNumber> {
@@ -133,7 +133,7 @@ export class ExchangeWrapper extends ContractWrapper {
* @param methodOpts Optional arguments this method accepts.
* @return The amount of the order (in taker tokens) that has been cancelled.
*/
- public async getCanceledTakerAmountAsync(orderHash: string, methodOpts?: MethodOpts): Promise<BigNumber> {
+ public async getCancelledTakerAmountAsync(orderHash: string, methodOpts?: MethodOpts): Promise<BigNumber> {
assert.doesConformToSchema('orderHash', orderHash, schemas.orderHashSchema);
const exchangeContract = await this._getExchangeContractAsync();
diff --git a/packages/0x.js/src/stores/order_filled_cancelled_lazy_store.ts b/packages/0x.js/src/stores/order_filled_cancelled_lazy_store.ts
index 9d74da096..666d8363c 100644
--- a/packages/0x.js/src/stores/order_filled_cancelled_lazy_store.ts
+++ b/packages/0x.js/src/stores/order_filled_cancelled_lazy_store.ts
@@ -42,7 +42,7 @@ export class OrderFilledCancelledLazyStore {
const methodOpts = {
defaultBlock: BlockParamLiteral.Pending,
};
- const cancelledTakerAmount = await this.exchange.getCanceledTakerAmountAsync(orderHash, methodOpts);
+ const cancelledTakerAmount = await this.exchange.getCancelledTakerAmountAsync(orderHash, methodOpts);
this.setCancelledTakerAmount(orderHash, cancelledTakerAmount);
}
const cachedCancelled = this.cancelledTakerAmount[orderHash];
diff --git a/packages/0x.js/src/types.ts b/packages/0x.js/src/types.ts
index 11683378f..11b5d8569 100644
--- a/packages/0x.js/src/types.ts
+++ b/packages/0x.js/src/types.ts
@@ -488,7 +488,7 @@ export interface OrderRelevantState {
makerFeeBalance: BigNumber;
makerFeeProxyAllowance: BigNumber;
filledTakerTokenAmount: BigNumber;
- canceledTakerTokenAmount: BigNumber;
+ cancelledTakerTokenAmount: BigNumber;
remainingFillableMakerTokenAmount: BigNumber;
}
diff --git a/packages/0x.js/src/utils/abi_decoder.ts b/packages/0x.js/src/utils/abi_decoder.ts
index 840ad9be0..df0fb2d6f 100644
--- a/packages/0x.js/src/utils/abi_decoder.ts
+++ b/packages/0x.js/src/utils/abi_decoder.ts
@@ -34,7 +34,7 @@ export class AbiDecoder {
value = this.padZeros(new BigNumber(value).toString(16));
} else if (param.type === SolidityTypes.Uint256 ||
param.type === SolidityTypes.Uint8 ||
- param.type === SolidityTypes.Uint ) {
+ param.type === SolidityTypes.Uint) {
value = new BigNumber(value);
}
decodedParams[param.name] = value;
diff --git a/packages/0x.js/src/utils/order_state_utils.ts b/packages/0x.js/src/utils/order_state_utils.ts
index f82601cae..a1ee7577d 100644
--- a/packages/0x.js/src/utils/order_state_utils.ts
+++ b/packages/0x.js/src/utils/order_state_utils.ts
@@ -67,7 +67,7 @@ export class OrderStateUtils {
zrxTokenAddress, signedOrder.maker,
);
const filledTakerTokenAmount = await this.orderFilledCancelledLazyStore.getFilledTakerAmountAsync(orderHash);
- const canceledTakerTokenAmount = await this.orderFilledCancelledLazyStore.getCancelledTakerAmountAsync(
+ const cancelledTakerTokenAmount = await this.orderFilledCancelledLazyStore.getCancelledTakerAmountAsync(
orderHash,
);
const unavailableTakerTokenAmount = await exchange.getUnavailableTakerAmountAsync(orderHash);
@@ -85,13 +85,13 @@ export class OrderStateUtils {
makerFeeBalance,
makerFeeProxyAllowance,
filledTakerTokenAmount,
- canceledTakerTokenAmount,
+ cancelledTakerTokenAmount,
remainingFillableMakerTokenAmount,
};
return orderRelevantState;
}
private validateIfOrderIsValid(signedOrder: SignedOrder, orderRelevantState: OrderRelevantState): void {
- const unavailableTakerTokenAmount = orderRelevantState.canceledTakerTokenAmount.add(
+ const unavailableTakerTokenAmount = orderRelevantState.cancelledTakerTokenAmount.add(
orderRelevantState.filledTakerTokenAmount,
);
const availableTakerTokenAmount = signedOrder.takerTokenAmount.minus(unavailableTakerTokenAmount);