Make awaitTransactionMinedAsync non-generic again

This commit is contained in:
Leonid Logvinov
2018-01-22 22:19:29 +01:00
parent ed77c6cb54
commit a17091b394
3 changed files with 13 additions and 13 deletions

View File

@@ -285,18 +285,18 @@ export class ZeroEx {
* @param timeoutMs How long (in ms) to poll for transaction mined until aborting.
* @return Transaction receipt with decoded log args.
*/
public async awaitTransactionMinedAsync<ArgsType>(
public async awaitTransactionMinedAsync(
txHash: string,
pollingIntervalMs = 1000,
timeoutMs?: number,
): Promise<TransactionReceiptWithDecodedLogs<ArgsType>> {
): Promise<TransactionReceiptWithDecodedLogs> {
let timeoutExceeded = false;
if (timeoutMs) {
setTimeout(() => (timeoutExceeded = true), timeoutMs);
}
const txReceiptPromise = new Promise(
(resolve: (receipt: TransactionReceiptWithDecodedLogs<ArgsType>) => void, reject) => {
(resolve: (receipt: TransactionReceiptWithDecodedLogs) => void, reject) => {
const intervalId = intervalUtils.setAsyncExcludingInterval(
async () => {
if (timeoutExceeded) {
@@ -311,7 +311,7 @@ export class ZeroEx {
transactionReceipt.logs,
this._abiDecoder.tryToDecodeLogOrNoop.bind(this._abiDecoder),
);
const transactionReceiptWithDecodedLogArgs: TransactionReceiptWithDecodedLogs<ArgsType> = {
const transactionReceiptWithDecodedLogArgs: TransactionReceiptWithDecodedLogs = {
...transactionReceipt,
logs: logsWithDecodedArgs,
};