Check transaction receipt status codes where applicable

This commit is contained in:
Alex Browne
2018-05-22 17:52:27 -07:00
parent f6b81f588d
commit b05a3b7aed
21 changed files with 144 additions and 94 deletions

View File

@@ -247,7 +247,7 @@ export class ExchangeWrapper {
return tx;
}
private async _getTxWithDecodedExchangeLogsAsync(txHash: string): Promise<TransactionReceiptWithDecodedLogs> {
const tx = await this._web3Wrapper.awaitTransactionMinedAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS);
const tx = await this._web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS);
tx.logs = _.filter(tx.logs, log => log.address === this._exchange.address);
tx.logs = _.map(tx.logs, log => this._logDecoder.decodeLogOrThrow(log));
return tx;