Skip to content

Commit

Permalink
Added wait to transactions returned by getBlockWithTransactions (#971).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Jul 23, 2021
1 parent 551cfa0 commit 660e69d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/providers/src.ts/base-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1388,10 +1388,14 @@ export class BaseProvider extends Provider implements EnsProvider {
tx.confirmations = confirmations;
}
}
return this.formatter.blockWithTransactions(block);

const blockWithTxs = this.formatter.blockWithTransactions(block);
blockWithTxs.transactions = block.transactions.map((tx: TransactionResponse) => this._wrapTransaction(tx));
return blockWithTxs;
}

return this.formatter.block(block);

}, { oncePoll: this });
}

Expand Down

0 comments on commit 660e69d

Please sign in to comment.