Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async getTransactionByHash (txHash) {
txHash = ensure0x(txHash)
const currentBlock = await this.getBlockHeight()
const tx = await this.jsonrpc('eth_getTransactionByHash', txHash)
return normalizeTransactionObject(tx, currentBlock)
}
block.transactions = block.transactions.map(tx => normalizeTransactionObject(tx, currentHeight))
}