aboutsummaryrefslogtreecommitdiffstats
path: root/src/contract_wrappers/exchange_wrapper.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/contract_wrappers/exchange_wrapper.ts')
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts
index 9d73a4ede..c6632175c 100644
--- a/src/contract_wrappers/exchange_wrapper.ts
+++ b/src/contract_wrappers/exchange_wrapper.ts
@@ -27,7 +27,7 @@ import {
LogFillContractEventArgs,
LogCancelContractEventArgs,
LogWithDecodedArgs,
- CallOpts,
+ MethodOpts,
} from '../types';
import {assert} from '../utils/assert';
import {utils} from '../utils/utils';
@@ -86,14 +86,15 @@ export class ExchangeWrapper extends ContractWrapper {
* subtracting the unavailable amount from the total order takerAmount.
* @param orderHash The hex encoded orderHash for which you would like to retrieve the
* unavailable takerAmount.
- * @param callOpts ${FABIOS_COMMENT}
+ * @param methodOpts ${FABIOS_COMMENT}
* @return The amount of the order (in taker tokens) that has either been filled or canceled.
*/
- public async getUnavailableTakerAmountAsync(orderHash: string, callOpts?: CallOpts): Promise<BigNumber.BigNumber> {
+ public async getUnavailableTakerAmountAsync(orderHash: string,
+ methodOpts?: MethodOpts): Promise<BigNumber.BigNumber> {
assert.doesConformToSchema('orderHash', orderHash, schemas.orderHashSchema);
const exchangeContract = await this._getExchangeContractAsync();
- const defaultBlock = _.isUndefined(callOpts) ? undefined : callOpts.defaultBlock;
+ const defaultBlock = _.isUndefined(methodOpts) ? undefined : methodOpts.defaultBlock;
let unavailableTakerTokenAmount = await exchangeContract.getUnavailableTakerTokenAmount.callAsync(
orderHash, defaultBlock,
);
@@ -104,14 +105,14 @@ export class ExchangeWrapper extends ContractWrapper {
/**
* Retrieve the takerAmount of an order that has already been filled.
* @param orderHash The hex encoded orderHash for which you would like to retrieve the filled takerAmount.
- * @param callOpts ${FABIOS_COMMENT}
+ * @param methodOpts ${FABIOS_COMMENT}
* @return The amount of the order (in taker tokens) that has already been filled.
*/
- public async getFilledTakerAmountAsync(orderHash: string, callOpts?: CallOpts): Promise<BigNumber.BigNumber> {
+ public async getFilledTakerAmountAsync(orderHash: string, methodOpts?: MethodOpts): Promise<BigNumber.BigNumber> {
assert.doesConformToSchema('orderHash', orderHash, schemas.orderHashSchema);
const exchangeContract = await this._getExchangeContractAsync();
- const defaultBlock = _.isUndefined(callOpts) ? undefined : callOpts.defaultBlock;
+ const defaultBlock = _.isUndefined(methodOpts) ? undefined : methodOpts.defaultBlock;
let fillAmountInBaseUnits = await exchangeContract.filled.callAsync(orderHash, defaultBlock);
// Wrap BigNumbers returned from web3 with our own (later) version of BigNumber
fillAmountInBaseUnits = new BigNumber(fillAmountInBaseUnits);
@@ -121,14 +122,14 @@ export class ExchangeWrapper extends ContractWrapper {
* Retrieve the takerAmount of an order that has been cancelled.
* @param orderHash The hex encoded orderHash for which you would like to retrieve the
* cancelled takerAmount.
- * @param callOpts ${FABIOS_COMMENT}
+ * @param methodOpts ${FABIOS_COMMENT}
* @return The amount of the order (in taker tokens) that has been cancelled.
*/
- public async getCanceledTakerAmountAsync(orderHash: string, callOpts?: CallOpts): Promise<BigNumber.BigNumber> {
+ public async getCanceledTakerAmountAsync(orderHash: string, methodOpts?: MethodOpts): Promise<BigNumber.BigNumber> {
assert.doesConformToSchema('orderHash', orderHash, schemas.orderHashSchema);
const exchangeContract = await this._getExchangeContractAsync();
- const defaultBlock = _.isUndefined(callOpts) ? undefined : callOpts.defaultBlock;
+ const defaultBlock = _.isUndefined(methodOpts) ? undefined : methodOpts.defaultBlock;
let cancelledAmountInBaseUnits = await exchangeContract.cancelled.callAsync(orderHash, defaultBlock);
// Wrap BigNumbers returned from web3 with our own (later) version of BigNumber
cancelledAmountInBaseUnits = new BigNumber(cancelledAmountInBaseUnits);