diff --git a/app/routes/activity/components/Activity.js b/app/routes/activity/components/Activity.js
index 46441ac3..bf406cc6 100644
--- a/app/routes/activity/components/Activity.js
+++ b/app/routes/activity/components/Activity.js
@@ -20,7 +20,7 @@ class Activity extends Component {
render() {
const { tab } = this.state
- const { activity: { activityLoading, payments, invoices } } = this.props
+ const { ticker, activity: { activityLoading, payments, invoices } } = this.props
if (activityLoading) { return
Loading...
}
return (
@@ -55,9 +55,9 @@ class Activity extends Component {
>
{
tab === 1 ?
-
+
:
-
+
}
diff --git a/app/routes/activity/components/Activity.scss b/app/routes/activity/components/Activity.scss
index d3b30b42..667258ce 100644
--- a/app/routes/activity/components/Activity.scss
+++ b/app/routes/activity/components/Activity.scss
@@ -55,6 +55,7 @@
&.active {
color: #eec27b;
+ font-weight: bold;
}
}
}
diff --git a/app/routes/activity/components/components/Invoices.js b/app/routes/activity/components/components/Invoices.js
index 5b27540e..32597a9f 100644
--- a/app/routes/activity/components/components/Invoices.js
+++ b/app/routes/activity/components/components/Invoices.js
@@ -2,12 +2,12 @@
import React, { Component } from 'react'
import Moment from 'react-moment'
import 'moment-timezone'
-import { satoshisToBtc } from '../../../../utils/bitcoin'
+import { satoshisToBtc, satoshisToUsd } from '../../../../utils/bitcoin'
import styles from './Invoices.scss'
class Invoices extends Component {
render() {
- const { invoices } = this.props
+ const { invoices, ticker } = this.props
return (
-
@@ -31,7 +31,14 @@ class Invoices extends Component {
{invoice.memo}
-
{satoshisToBtc(invoice.value, 2500)}
+
+ {
+ ticker.currency === 'btc' ?
+ satoshisToBtc(invoice.value)
+ :
+ satoshisToUsd(invoice.value, ticker.btcTicker.price_usd)
+ }
+
)
diff --git a/app/routes/activity/components/components/Payments.js b/app/routes/activity/components/components/Payments.js
index 581df405..4fb306e4 100644
--- a/app/routes/activity/components/components/Payments.js
+++ b/app/routes/activity/components/components/Payments.js
@@ -2,12 +2,12 @@
import React, { Component } from 'react'
import Moment from 'react-moment'
import 'moment-timezone'
-import { satoshisToBtc } from '../../../../utils/bitcoin'
+import { satoshisToBtc, satoshisToUsd } from '../../../../utils/bitcoin'
import styles from './Payments.scss'
class Payments extends Component {
render() {
- const { payments } = this.props
+ const { payments, ticker } = this.props
return (
-
@@ -36,10 +36,24 @@ class Payments extends Component {
- {payment.fee === '0' ? '0' : satoshisToBtc(payment.fee, 2500)}
+
+ {
+ ticker.currency === 'btc' ?
+ satoshisToBtc(payment.fee)
+ :
+ satoshisToUsd(payment.fee, ticker.btcTicker.price_usd)
+ }
+
- {satoshisToBtc(payment.value, 2500)}
+
+ {
+ ticker.currency === 'btc' ?
+ satoshisToBtc(payment.value)
+ :
+ satoshisToUsd(payment.value, ticker.btcTicker.price_usd)
+ }
+
)
diff --git a/app/routes/activity/containers/ActivityContainer.js b/app/routes/activity/containers/ActivityContainer.js
index 4f1928b5..cebad370 100644
--- a/app/routes/activity/containers/ActivityContainer.js
+++ b/app/routes/activity/containers/ActivityContainer.js
@@ -7,7 +7,8 @@ const mapDispatchToProps = {
}
const mapStateToProps = (state) => ({
- activity: state.activity
+ activity: state.activity,
+ ticker: state.ticker
})
export default connect(mapStateToProps, mapDispatchToProps)(Activity)
\ No newline at end of file
diff --git a/app/routes/app/components/App.js b/app/routes/app/components/App.js
index 24d5c498..50356739 100644
--- a/app/routes/app/components/App.js
+++ b/app/routes/app/components/App.js
@@ -44,6 +44,7 @@ class App extends Component {
payment={payment}
fetchPeers={fetchPeers}
peers={peers}
+ ticker={ticker}
/>