Fix getTransactionSenderAccountIfExistsAsync to return true senderAddress or undefined if non available

This commit is contained in:
Fabio Berger
2017-06-02 12:15:50 +02:00
parent 5155f49804
commit fc7592d73f
3 changed files with 7 additions and 6 deletions

View File

@@ -24,12 +24,12 @@ export class FillScenarios {
await this.zeroEx.token.transferAsync(takerTokenAddress, this.coinBase, takerAddress, fillableAmount);
await this.zeroEx.token.setProxyAllowanceAsync(takerTokenAddress, takerAddress, fillableAmount);
const transactionSenderAccount = this.zeroEx.getTransactionSenderAccount();
const transactionSenderAccount = await this.zeroEx.getTransactionSenderAccountIfExistsAsync();
this.zeroEx.setTransactionSenderAccount(makerAddress);
const signedOrder = await orderFactory.createSignedOrderAsync(this.zeroEx, makerAddress,
takerAddress, fillableAmount, makerTokenAddress, fillableAmount, takerTokenAddress,
expirationUnixTimestampSec);
this.zeroEx.setTransactionSenderAccount(transactionSenderAccount);
this.zeroEx.setTransactionSenderAccount(transactionSenderAccount as string);
return signedOrder;
}
}