Address feedback

This commit is contained in:
Leonid Logvinov
2017-06-02 18:34:43 +02:00
parent 0c98f4c754
commit 9620b18fec
2 changed files with 5 additions and 3 deletions

View File

@@ -71,13 +71,14 @@ export class FillScenarios {
await this.zeroEx.token.setProxyAllowanceAsync(this.zrxTokenAddress, takerAddress, takerFee);
}
const transactionSenderAccount = await this.zeroEx.getTransactionSenderAccountIfExistsAsync();
const prevTransactionSenderAccount = await this.zeroEx.getTransactionSenderAccountIfExistsAsync();
this.zeroEx.setTransactionSenderAccount(makerAddress);
const signedOrder = await orderFactory.createSignedOrderAsync(this.zeroEx,
makerAddress, takerAddress, makerFee, takerFee,
makerFillableAmount, makerTokenAddress, takerFillableAmount, takerTokenAddress,
feeRecepient, expirationUnixTimestampSec);
this.zeroEx.setTransactionSenderAccount(transactionSenderAccount as string);
// We re-set the transactionSender to avoid introducing side-effects
this.zeroEx.setTransactionSenderAccount(prevTransactionSenderAccount as string);
return signedOrder;
}
}

View File

@@ -16,8 +16,9 @@ export class TokenUtils {
return zrxToken;
}
public getNonProtocolTokens(): Token[] {
return _.filter(this.tokens, token => {
const nonProtocolTokens = _.filter(this.tokens, token => {
return token.symbol !== PROTOCOL_TOKEN_SYMBOL;
});
return nonProtocolTokens;
}
}