aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/util/exchange_wrapper.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-02-24 06:13:35 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-02-28 04:05:46 +0800
commit93b2736d6533f983aeb74005004de7f40eb35851 (patch)
tree51f25e54b7afeebc7fc482bf78f12a0f9bb1eda1 /packages/contracts/util/exchange_wrapper.ts
parent34274a10428bbc07a4f075bcf4a3ccafe0c04f5e (diff)
downloaddexon-sol-tools-93b2736d6533f983aeb74005004de7f40eb35851.tar
dexon-sol-tools-93b2736d6533f983aeb74005004de7f40eb35851.tar.gz
dexon-sol-tools-93b2736d6533f983aeb74005004de7f40eb35851.tar.bz2
dexon-sol-tools-93b2736d6533f983aeb74005004de7f40eb35851.tar.lz
dexon-sol-tools-93b2736d6533f983aeb74005004de7f40eb35851.tar.xz
dexon-sol-tools-93b2736d6533f983aeb74005004de7f40eb35851.tar.zst
dexon-sol-tools-93b2736d6533f983aeb74005004de7f40eb35851.zip
Use the same templates as 0x.js
Diffstat (limited to 'packages/contracts/util/exchange_wrapper.ts')
-rw-r--r--packages/contracts/util/exchange_wrapper.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/contracts/util/exchange_wrapper.ts b/packages/contracts/util/exchange_wrapper.ts
index 03d04629d..f016067fe 100644
--- a/packages/contracts/util/exchange_wrapper.ts
+++ b/packages/contracts/util/exchange_wrapper.ts
@@ -186,11 +186,11 @@ export class ExchangeWrapper {
public async getOrderHashAsync(signedOrder: SignedOrder): Promise<string> {
const shouldThrowOnInsufficientBalanceOrAllowance = false;
const params = signedOrderUtils.getOrderAddressesAndValues(signedOrder);
- const orderHash = await this._exchange.getOrderHash(params.orderAddresses, params.orderValues);
+ const orderHash = await this._exchange.getOrderHash.callAsync(params.orderAddresses, params.orderValues);
return orderHash;
}
public async isValidSignatureAsync(signedOrder: SignedOrder): Promise<boolean> {
- const isValidSignature = await this._exchange.isValidSignature(
+ const isValidSignature = await this._exchange.isValidSignature.callAsync(
signedOrder.maker,
ZeroEx.getOrderHashHex(signedOrder),
signedOrder.ecSignature.v,
@@ -204,7 +204,7 @@ export class ExchangeWrapper {
denominator: BigNumber,
target: BigNumber,
): Promise<boolean> {
- const isRoundingError = await this._exchange.isRoundingError(numerator, denominator, target);
+ const isRoundingError = await this._exchange.isRoundingError.callAsync(numerator, denominator, target);
return isRoundingError;
}
public async getPartialAmountAsync(
@@ -212,7 +212,9 @@ export class ExchangeWrapper {
denominator: BigNumber,
target: BigNumber,
): Promise<BigNumber> {
- const partialAmount = new BigNumber(await this._exchange.getPartialAmount(numerator, denominator, target));
+ const partialAmount = new BigNumber(
+ await this._exchange.getPartialAmount.callAsync(numerator, denominator, target),
+ );
return partialAmount;
}
}