diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-03 00:34:43 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-03 00:37:25 +0800 |
commit | 9620b18fecb59b5ce4c2fec483e426f79852c034 (patch) | |
tree | 92ed02554b59c473b3c855945a5ce65b28d13d2d | |
parent | 0c98f4c754a6a3aceeaf93f40ee431850a28c7e9 (diff) | |
download | dexon-sol-tools-9620b18fecb59b5ce4c2fec483e426f79852c034.tar dexon-sol-tools-9620b18fecb59b5ce4c2fec483e426f79852c034.tar.gz dexon-sol-tools-9620b18fecb59b5ce4c2fec483e426f79852c034.tar.bz2 dexon-sol-tools-9620b18fecb59b5ce4c2fec483e426f79852c034.tar.lz dexon-sol-tools-9620b18fecb59b5ce4c2fec483e426f79852c034.tar.xz dexon-sol-tools-9620b18fecb59b5ce4c2fec483e426f79852c034.tar.zst dexon-sol-tools-9620b18fecb59b5ce4c2fec483e426f79852c034.zip |
Address feedback
-rw-r--r-- | test/utils/fill_scenarios.ts | 5 | ||||
-rw-r--r-- | test/utils/token_utils.ts | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/test/utils/fill_scenarios.ts b/test/utils/fill_scenarios.ts index f95b06663..a44d6b18a 100644 --- a/test/utils/fill_scenarios.ts +++ b/test/utils/fill_scenarios.ts @@ -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; } } diff --git a/test/utils/token_utils.ts b/test/utils/token_utils.ts index 3d2faa959..14788b299 100644 --- a/test/utils/token_utils.ts +++ b/test/utils/token_utils.ts @@ -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; } } |