Fix the return types and export the required public types

This commit is contained in:
Leonid Logvinov
2017-09-05 18:50:22 +02:00
parent a7b2131db7
commit 2f97ddb727
2 changed files with 8 additions and 5 deletions

View File

@@ -270,11 +270,12 @@ export class ZeroEx {
* Waits for a transaction to be mined and returns the transaction receipt. * Waits for a transaction to be mined and returns the transaction receipt.
* @param txHash Transaction hash * @param txHash Transaction hash
* @param pollingIntervalMs How often (in ms) should we check if the transaction is mined. * @param pollingIntervalMs How often (in ms) should we check if the transaction is mined.
* @return TransactionReceipt * @return Transaction receipt with decoded log args.
*/ */
public async awaitTransactionMinedAsync(txHash: string, public async awaitTransactionMinedAsync(
pollingIntervalMs: number = 1000): Promise<TransactionReceipt> { txHash: string, pollingIntervalMs: number = 1000): Promise<TransactionReceiptWithDecodedLogs> {
const txReceiptPromise = new Promise((resolve: (receipt: TransactionReceipt) => void, reject) => { const txReceiptPromise = new Promise(
(resolve: (receipt: TransactionReceiptWithDecodedLogs) => void, reject) => {
const intervalId = setInterval(async () => { const intervalId = setInterval(async () => {
const transactionReceipt = await this._web3Wrapper.getTransactionReceiptAsync(txHash); const transactionReceipt = await this._web3Wrapper.getTransactionReceiptAsync(txHash);
if (!_.isNull(transactionReceipt)) { if (!_.isNull(transactionReceipt)) {

View File

@@ -30,5 +30,7 @@ export {
ContractEventArgs, ContractEventArgs,
Web3Provider, Web3Provider,
ZeroExConfig, ZeroExConfig,
TransactionReceipt, TransactionReceiptWithDecodedLogs,
LogWithDecodedArgs,
DecodedLogArgs,
} from './types'; } from './types';