Added wait to transactions returned by getBlockWithTransactions (#971).

This commit is contained in:
Richard Moore 2021-07-22 20:04:07 -04:00
parent 551cfa0062
commit 660e69db71
No known key found for this signature in database
GPG Key ID: 665176BE8E9DC651

@ -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 });
}