aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-06-02 00:31:08 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-06-02 00:31:08 +0800
commit520248e6787a04b2fcf45d7f185d85214a84bfd5 (patch)
tree81aa132559bb58cce00efd20486e5d994c07236d /src
parent0554f947b12f36a1cd5f7be469123e794b467f0b (diff)
downloaddexon-sol-tools-520248e6787a04b2fcf45d7f185d85214a84bfd5.tar
dexon-sol-tools-520248e6787a04b2fcf45d7f185d85214a84bfd5.tar.gz
dexon-sol-tools-520248e6787a04b2fcf45d7f185d85214a84bfd5.tar.bz2
dexon-sol-tools-520248e6787a04b2fcf45d7f185d85214a84bfd5.tar.lz
dexon-sol-tools-520248e6787a04b2fcf45d7f185d85214a84bfd5.tar.xz
dexon-sol-tools-520248e6787a04b2fcf45d7f185d85214a84bfd5.tar.zst
dexon-sol-tools-520248e6787a04b2fcf45d7f185d85214a84bfd5.zip
Make validateFillOrder asyncronous
Diffstat (limited to 'src')
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts
index dd3c3c933..dc2c95d4e 100644
--- a/src/contract_wrappers/exchange_wrapper.ts
+++ b/src/contract_wrappers/exchange_wrapper.ts
@@ -76,7 +76,7 @@ export class ExchangeWrapper extends ContractWrapper {
const senderAddress = await this.web3Wrapper.getSenderAddressOrThrowAsync();
const exchangeInstance = await this.getExchangeContractAsync();
- this.validateFillOrder(signedOrder, fillTakerAmountInBaseUnits, senderAddress);
+ await this.validateFillOrderAsync(signedOrder, fillTakerAmountInBaseUnits, senderAddress);
const orderAddresses: OrderAddresses = [
signedOrder.maker,
@@ -120,7 +120,7 @@ export class ExchangeWrapper extends ContractWrapper {
);
this.throwErrorLogsAsErrors(response.logs);
}
- private async validateFillOrder(signedOrder: SignedOrder, fillAmount: BigNumber.BigNumber, senderAddress: string) {
+ private async validateFillOrderAsync(signedOrder: SignedOrder, fillAmount: BigNumber.BigNumber, senderAddress: string) {
if (fillAmount.eq(0)) {
throw new Error(FillOrderValidationErrs.FILL_AMOUNT_IS_ZERO);
}