UNPKG

presale-demo-pe

Version:

This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).

12 lines (11 loc) 481 B
import moment from 'moment'; export default (arr, course) => ( arr.map(item => { const MAX_CONFIRMATIONS = 3; const date = moment.unix(item.timeStamp).format('DD/MM/YYYY HH:mm'); const eth = (item.value * Math.pow(10, -18)).toFixed(8).replace(/0+$/, ""); const snm = (eth * course).toFixed(8).replace(/0+$/, ""); const confirmed = Number(item.confirmations) > MAX_CONFIRMATIONS; return ({ date, eth, snm, confirmed }); }) );