/* @flow */ 'use strict'; import React, { Component } from 'react'; const formatTime = (ts) => { var date = new Date(ts * 1000); // Hours part from the timestamp var hours = date.getHours(); // Minutes part from the timestamp var minutes = "0" + date.getMinutes(); // Seconds part from the timestamp var seconds = "0" + date.getSeconds(); // Will display time in 10:30:23 format return hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2); } const History = (props): any => { const web3 = props.web3; const { addresses } = props.addresses; const currentAddress = addresses[ parseInt(props.match.params.address) ]; if (!currentAddress) return null; let txs = null; let pendingTransactions = null; if (currentAddress.history) { const pending = currentAddress.pendingTx; if (pending.length > 0) { pendingTransactions = pending.map((tx, i) => { const etherscanLink = `https://ropsten.etherscan.io/tx/${ tx.hash }`; return (