diff --git a/app/components/CryptoIcon/CryptoIcon.js b/app/components/CryptoIcon/CryptoIcon.js index b9237e7d..f009fe59 100644 --- a/app/components/CryptoIcon/CryptoIcon.js +++ b/app/components/CryptoIcon/CryptoIcon.js @@ -4,12 +4,12 @@ import path from 'path' import { FaBitcoin } from 'react-icons/lib/fa' import Isvg from 'react-inlinesvg' -const CryptoIcon = ({ currency }) => { +const CryptoIcon = ({ currency, styles }) => { switch (currency) { case 'btc': - return + return case 'ltc': - return + return default: return } diff --git a/app/components/CurrencyIcon/CurrencyIcon.js b/app/components/CurrencyIcon/CurrencyIcon.js index 19840e18..3e5318be 100644 --- a/app/components/CurrencyIcon/CurrencyIcon.js +++ b/app/components/CurrencyIcon/CurrencyIcon.js @@ -3,14 +3,15 @@ import PropTypes from 'prop-types' import { FaDollar } from 'react-icons/lib/fa' import CryptoIcon from '../CryptoIcon' -const CurrencyIcon = ({ currency, crypto }) => (currency === 'usd' ? - +const CurrencyIcon = ({ currency, crypto, styles }) => (currency === 'usd' ? + : - ) + ) CurrencyIcon.propTypes = { currency: PropTypes.string.isRequired, - crypto: PropTypes.string.isRequired + crypto: PropTypes.string.isRequired, + styles: PropTypes.object } export default CurrencyIcon diff --git a/app/routes/activity/components/components/Invoices.js b/app/routes/activity/components/components/Invoices.js index b95d657d..81131da4 100644 --- a/app/routes/activity/components/components/Invoices.js +++ b/app/routes/activity/components/components/Invoices.js @@ -6,6 +6,7 @@ import { FaBitcoin, FaDollar } from 'react-icons/lib/fa' import { MdCheck } from 'react-icons/lib/md' import QRCode from 'qrcode.react' import Modal from './Modal' +import CurrencyIcon from '../../../../components/CurrencyIcon' import { btc } from '../../../../utils' import styles from './Invoices.scss' @@ -24,18 +25,13 @@ const Invoices = ({

{invoice.memo}

- { - ticker.currency === 'btc' ? - - : - - } + { - ticker.currency === 'btc' ? - btc.satoshisToBtc(invoice.value) - : + ticker.currency === 'usd' ? btc.satoshisToUsd(invoice.value, currentTicker.price_usd) + : + btc.satoshisToBtc(invoice.value) }

@@ -89,10 +85,10 @@ const Invoices = ({
{ - ticker.currency === 'btc' ? - btc.satoshisToBtc(invoiceItem.value) - : + ticker.currency === 'usd' ? btc.satoshisToUsd(invoiceItem.value, currentTicker.price_usd) + : + btc.satoshisToBtc(invoiceItem.value) }
diff --git a/app/routes/activity/components/components/Invoices.scss b/app/routes/activity/components/components/Invoices.scss index 63146603..0a30b26b 100644 --- a/app/routes/activity/components/components/Invoices.scss +++ b/app/routes/activity/components/components/Invoices.scss @@ -17,7 +17,18 @@ margin: 20px 20px 60px 0; svg { - font-size: 20px; + font-size: 30px; + vertical-align: top; + } + + span svg[data-icon='ltc'] { + width: 30px; + height: 30px; + vertical-align: top; + + g { + transform: scale(1.75) translate(-5px, -5px); + } } .value { diff --git a/app/routes/activity/components/components/Payments.js b/app/routes/activity/components/components/Payments.js index 9117084a..a37d57a4 100644 --- a/app/routes/activity/components/components/Payments.js +++ b/app/routes/activity/components/components/Payments.js @@ -4,6 +4,7 @@ import Moment from 'react-moment' import 'moment-timezone' import { FaBitcoin, FaDollar } from 'react-icons/lib/fa' import Modal from './Modal' +import CurrencyIcon from '../../../../components/CurrencyIcon' import { btc } from '../../../../utils' import styles from './Payments.scss' @@ -22,18 +23,13 @@ const Payments = ({

{payment.payment_hash}

- { - ticker.currency === 'btc' ? - - : - - } + { - ticker.currency === 'btc' ? - btc.satoshisToBtc(payment.value) - : + ticker.currency === 'usd' ? btc.satoshisToUsd(payment.value, currentTicker.price_usd) + : + btc.satoshisToBtc(payment.value) }

@@ -79,10 +75,10 @@ const Payments = ({
{ - ticker.currency === 'btc' ? - btc.satoshisToBtc(paymentItem.fee) - : + ticker.currency === 'usd' ? btc.satoshisToUsd(paymentItem.fee, currentTicker.price_usd) + : + btc.satoshisToBtc(paymentItem.fee) }
diff --git a/app/routes/activity/components/components/Payments.scss b/app/routes/activity/components/components/Payments.scss index 70a219cb..c7a697cb 100644 --- a/app/routes/activity/components/components/Payments.scss +++ b/app/routes/activity/components/components/Payments.scss @@ -10,6 +10,17 @@ svg { font-size: 30px; + vertical-align: top; + } + + span svg[data-icon='ltc'] { + width: 30px; + height: 30px; + vertical-align: top; + + g { + transform: scale(1.75) translate(-5px, -5px); + } } .value {