aboutsummaryrefslogtreecommitdiffstats
path: root/src/contract_wrappers
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-06-02 03:14:30 +0800
committerFabio Berger <me@fabioberger.com>2017-06-02 03:14:30 +0800
commit3e0c2ad7530927fa1c9019bbc311a88d327e2306 (patch)
tree435dd8a0efe6c057958d348bc0e9bfd3dcbba6cc /src/contract_wrappers
parentaade6891e834dda7e80d76740882facdb45bc014 (diff)
parentf663a15c9b000d639bd0d58d0c177e6de9d47346 (diff)
downloaddexon-sol-tools-3e0c2ad7530927fa1c9019bbc311a88d327e2306.tar
dexon-sol-tools-3e0c2ad7530927fa1c9019bbc311a88d327e2306.tar.gz
dexon-sol-tools-3e0c2ad7530927fa1c9019bbc311a88d327e2306.tar.bz2
dexon-sol-tools-3e0c2ad7530927fa1c9019bbc311a88d327e2306.tar.lz
dexon-sol-tools-3e0c2ad7530927fa1c9019bbc311a88d327e2306.tar.xz
dexon-sol-tools-3e0c2ad7530927fa1c9019bbc311a88d327e2306.tar.zst
dexon-sol-tools-3e0c2ad7530927fa1c9019bbc311a88d327e2306.zip
Merge branch 'fillOrderAsync' into unavailableFilledCancelled
Diffstat (limited to 'src/contract_wrappers')
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts
index 6f6380bb8..8b20d2b4d 100644
--- a/src/contract_wrappers/exchange_wrapper.ts
+++ b/src/contract_wrappers/exchange_wrapper.ts
@@ -107,10 +107,10 @@ export class ExchangeWrapper extends ContractWrapper {
assert.isBoolean('shouldCheckTransfer', shouldCheckTransfer);
const senderAddress = await this.web3Wrapper.getSenderAddressOrThrowAsync();
- const exchangeInstance = await this.getExchangeContractAsync();
-
await this.validateFillOrderAsync(signedOrder, fillTakerAmountInBaseUnits, senderAddress);
+ const exchangeInstance = await this.getExchangeContractAsync();
+
const orderAddresses: OrderAddresses = [
signedOrder.maker,
signedOrder.taker,
@@ -164,7 +164,8 @@ export class ExchangeWrapper extends ContractWrapper {
if (signedOrder.expirationUnixTimestampSec.lessThan(Date.now() / 1000)) {
throw new Error(FillOrderValidationErrs.EXPIRED);
}
- const makerBalance = await this.tokenWrapper.getBalanceAsync(signedOrder.makerTokenAddress, signedOrder.maker);
+ const makerBalance = await this.tokenWrapper.getBalanceAsync(signedOrder.makerTokenAddress,
+ signedOrder.maker);
const takerBalance = await this.tokenWrapper.getBalanceAsync(signedOrder.takerTokenAddress, senderAddress);
const makerAllowance = await this.tokenWrapper.getProxyAllowanceAsync(signedOrder.makerTokenAddress,
signedOrder.maker);