aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/0x.js.ts2
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts7
-rw-r--r--src/types.ts4
3 files changed, 9 insertions, 4 deletions
diff --git a/src/0x.js.ts b/src/0x.js.ts
index c799e63e9..2bced325f 100644
--- a/src/0x.js.ts
+++ b/src/0x.js.ts
@@ -120,7 +120,7 @@ export class ZeroEx {
/**
* Sets default account for sending transactions.
*/
- public setDefaultAccount(account: string): void {
+ public setTransactionSenderAccount(account: string): void {
this.web3Wrapper.setDefaultAccount(account);
}
/**
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);
diff --git a/src/types.ts b/src/types.ts
index 2686c140a..29f7e0ee4 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -147,3 +147,7 @@ export interface TxOpts {
from: string;
gas?: number;
}
+
+export interface TokenAddressBySymbol {
+ [symbol: string]: string;
+}