From 6cca3ebe57b3707126c8cd518666a0e3eea4508c Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 7 Mar 2018 17:01:12 -0600 Subject: [PATCH] add prop details to general list --- app/components/Transaction/index.jsx | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/app/components/Transaction/index.jsx b/app/components/Transaction/index.jsx index da51dd66..207b2338 100644 --- a/app/components/Transaction/index.jsx +++ b/app/components/Transaction/index.jsx @@ -11,7 +11,6 @@ import { Col, Row } from 'reactstrap'; import styled from 'styled-components'; import ArrowIcon from 'react-icons/lib/io/arrow-right-c'; -import tokenLogo from 'images/token31.png'; import { CONFIRMATIONS } from 'containers/Transactions/constants'; import './transaction.scss'; @@ -23,12 +22,29 @@ const IMG = styled.img` class Transaction extends React.PureComponent { // eslint-disable-line react/prefer-stateless-function render() { + const isValid = this.props.valid; + const progressColor = (isValid ? 'info' : 'danger'); + const progressPercent = Math.floor(((this.props.confirmations / CONFIRMATIONS) * 100)); const status = ( - this.props.confirmations < CONFIRMATIONS - ? `CONFIRMING (${this.props.confirmations} of ${CONFIRMATIONS})` - : 'CONFIRMED' + isValid ? + this.props.confirmations < CONFIRMATIONS ? + `CONFIRMING (${this.props.confirmations} of ${CONFIRMATIONS})` : + 'CONFIRMED' + : + 'INVALID' ); + let tokenLogo; + try { + tokenLogo = require(`images/token${this.props.propertyid}.png`); + } catch (e) { + if (this.props.type_int === 4) { + tokenLogo = require('images/sendall.png'); + } else { + tokenLogo = require('images/tokendefault.png'); + } + } + return ( @@ -90,7 +106,7 @@ class Transaction extends React.PureComponent { // eslint-disable-line react/pre - TetherUS (#31) + TokenName (#this.props.propertyid)