diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-05-12 05:51:00 +0800 |
---|---|---|
committer | Greg Hysen <greg.hysen@gmail.com> | 2018-05-19 08:01:06 +0800 |
commit | 5735095521aeda75b257236e34d6ec76c16df8ab (patch) | |
tree | 14ef56b89e5ca3105408fad7b98f3151571b4bc4 /packages/contracts/src/utils | |
parent | fa7570352ce65dc58df6969c5a24cf3f487e738f (diff) | |
download | dexon-sol-tools-5735095521aeda75b257236e34d6ec76c16df8ab.tar dexon-sol-tools-5735095521aeda75b257236e34d6ec76c16df8ab.tar.gz dexon-sol-tools-5735095521aeda75b257236e34d6ec76c16df8ab.tar.bz2 dexon-sol-tools-5735095521aeda75b257236e34d6ec76c16df8ab.tar.lz dexon-sol-tools-5735095521aeda75b257236e34d6ec76c16df8ab.tar.xz dexon-sol-tools-5735095521aeda75b257236e34d6ec76c16df8ab.tar.zst dexon-sol-tools-5735095521aeda75b257236e34d6ec76c16df8ab.zip |
Style changes to atomic order matching
Diffstat (limited to 'packages/contracts/src/utils')
-rw-r--r-- | packages/contracts/src/utils/exchange_wrapper.ts | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/packages/contracts/src/utils/exchange_wrapper.ts b/packages/contracts/src/utils/exchange_wrapper.ts index 6d36198f2..5b026fce0 100644 --- a/packages/contracts/src/utils/exchange_wrapper.ts +++ b/packages/contracts/src/utils/exchange_wrapper.ts @@ -225,12 +225,6 @@ export class ExchangeWrapper { const filledAmount = new BigNumber(await this._exchange.filled.callAsync(orderHashHex)); return filledAmount; } - private async _getTxWithDecodedExchangeLogsAsync(txHash: string) { - const tx = await this._zeroEx.awaitTransactionMinedAsync(txHash); - tx.logs = _.filter(tx.logs, log => log.address === this._exchange.address); - tx.logs = _.map(tx.logs, log => this._logDecoder.decodeLogOrThrow(log)); - return tx; - } public async getOrderInfoAsync( signedOrder: SignedOrder, ): Promise<[number /* orderStatus */, string /* orderHash */, BigNumber /* orderTakerAssetAmountFilled */]> { @@ -251,6 +245,14 @@ export class ExchangeWrapper { { from }, ); const tx = await this._getTxWithDecodedExchangeLogsAsync(txHash); + tx.logs = _.filter(tx.logs, log => log.address === this._exchange.address); + tx.logs = _.map(tx.logs, log => this._logDecoder.decodeLogOrThrow(log)); + return tx; + } + private async _getTxWithDecodedExchangeLogsAsync(txHash: string) { + const tx = await this._zeroEx.awaitTransactionMinedAsync(txHash); + tx.logs = _.filter(tx.logs, log => log.address === this._exchange.address); + tx.logs = _.map(tx.logs, log => this._logDecoder.decodeLogOrThrow(log)); return tx; } } |