UNPKG

leap-node

Version:

[![codecov](https://codecov.io/gh/leapdao/leap-node/branch/master/graph/badge.svg)](https://codecov.io/gh/leapdao/leap-node) [![Docker Repository on Quay](https://quay.io/repository/leapdao/leap-node/status "Docker Repository on Quay")](https://quay.io/re

11 lines (8 loc) 400 B
const { Tx } = require('leap-core'); const txResponse = require('./txResponse'); module.exports = async (db, hash) => { const txDoc = await db.getTransaction(hash); if (!txDoc) return null; // return null as Infura does const { txData, blockHash, height, txPos } = txDoc; return await txResponse(db, Tx.fromJSON(txData), blockHash, height, txPos); // eslint-disable-line no-return-await };