diff --git a/.eslintrc b/.eslintrc
index 69ccec87..5ae6e558 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -46,7 +46,8 @@
"array": false,
"object": true
}],
- "prefer-promise-reject-errors": 0
+ "prefer-promise-reject-errors": 0,
+ "no-param-reassign": [2, { "props": false }]
},
"plugins": [
"flowtype",
diff --git a/app/reducers/activity.js b/app/reducers/activity.js
index 66551e95..2c6d402d 100644
--- a/app/reducers/activity.js
+++ b/app/reducers/activity.js
@@ -104,7 +104,6 @@ const searchSelector = state => state.activity.searchText
const paymentsSelector = state => state.payment.payments
const invoicesSelector = state => state.invoice.invoices
const transactionsSelector = state => state.transaction.transactions
-const channelsSelector = state => state.channels.channels
const invoiceExpired = (invoice) => {
const expiresAt = (parseInt(invoice.creation_date, 10) + parseInt(invoice.expiry, 10))
@@ -127,29 +126,22 @@ const months = ['Jan', 'Feb', 'Mar', 'April', 'May', 'June', 'July', 'Aug', 'Sep
// groups the data by day
function groupData(data) {
- const groups = data.reduce((groups, el) => {
+ return data.reduce((arr, el) => {
const d = new Date(returnTimestamp(el) * 1000)
const date = d.getDate()
const title = `${months[d.getMonth()]} ${date}, ${d.getFullYear()}`
- if (!groups[title]) { groups[title] = [] }
+ if (!arr[title]) { arr[title] = [] }
- groups[title].push({ el })
+ arr[title].push({ el })
- return groups
+ return arr
}, {})
-
- return groups
}
// takes the result of groupData and returns an array
function groupArray(data) {
- return Object.keys(data).map((title) => {
- return {
- title,
- activity: data[title]
- }
- })
+ return Object.keys(data).map(title => ({ title, activity: data[title] }))
}
// sorts data form new to old according to the timestamp
diff --git a/app/routes/activity/components/Activity.js b/app/routes/activity/components/Activity.js
index 0413fa47..c9b964c4 100644
--- a/app/routes/activity/components/Activity.js
+++ b/app/routes/activity/components/Activity.js
@@ -74,8 +74,6 @@ class Activity extends Component {
changeFilter,
currentActivity,
- network,
-
walletProps
} = this.props
@@ -108,7 +106,7 @@ class Activity extends Component {
{activityBlock.title}
{
- activityBlock.activity.map(activity => - {this.renderActivity(activity.el)}
)
+ activityBlock.activity.map((activity, i) => - {this.renderActivity(activity.el)}
)
}
@@ -129,6 +127,7 @@ Activity.propTypes = {
ticker: PropTypes.object.isRequired,
currentTicker: PropTypes.object.isRequired,
+ network: PropTypes.object.isRequired,
showActivityModal: PropTypes.func.isRequired,
changeFilter: PropTypes.func.isRequired,
@@ -136,7 +135,9 @@ Activity.propTypes = {
activity: PropTypes.object.isRequired,
currentActivity: PropTypes.array.isRequired,
balance: PropTypes.object.isRequired,
- walletProps: PropTypes.object.isRequired
+ walletProps: PropTypes.object.isRequired,
+
+ currencyName: PropTypes.string.isRequired
}
export default Activity
diff --git a/app/routes/activity/components/components/Invoice/Invoice.js b/app/routes/activity/components/components/Invoice/Invoice.js
index cc0ddfba..7b7642e5 100644
--- a/app/routes/activity/components/components/Invoice/Invoice.js
+++ b/app/routes/activity/components/components/Invoice/Invoice.js
@@ -5,10 +5,8 @@ import 'moment-timezone'
import { btc } from 'utils'
import Isvg from 'react-inlinesvg'
-import { FaBolt } from 'react-icons/lib/fa'
import Value from 'components/Value'
import checkmarkIcon from 'icons/check_circle.svg'
-import clockIcon from 'icons/clock.svg'
import styles from '../Activity.scss'
const Invoice = ({
diff --git a/app/routes/activity/components/components/Payment/Payment.js b/app/routes/activity/components/components/Payment/Payment.js
index d10f02a6..a21136af 100644
--- a/app/routes/activity/components/components/Payment/Payment.js
+++ b/app/routes/activity/components/components/Payment/Payment.js
@@ -5,10 +5,7 @@ import Moment from 'react-moment'
import 'moment-timezone'
import { btc } from 'utils'
-import Isvg from 'react-inlinesvg'
-import { FaBolt } from 'react-icons/lib/fa'
import Value from 'components/Value'
-import checkmarkIcon from 'icons/check_circle.svg'
import styles from '../Activity.scss'
const Payment = ({
@@ -53,9 +50,11 @@ const Payment = ({
}
Payment.propTypes = {
+ currencyName: PropTypes.string.isRequired,
payment: PropTypes.object.isRequired,
ticker: PropTypes.object.isRequired,
currentTicker: PropTypes.object.isRequired,
+ nodes: PropTypes.array.isRequired,
showActivityModal: PropTypes.func.isRequired
}
diff --git a/app/routes/activity/components/components/Transaction/Transaction.js b/app/routes/activity/components/components/Transaction/Transaction.js
index 48878a57..dcdad169 100644
--- a/app/routes/activity/components/components/Transaction/Transaction.js
+++ b/app/routes/activity/components/components/Transaction/Transaction.js
@@ -4,10 +4,7 @@ import Moment from 'react-moment'
import 'moment-timezone'
import { btc } from 'utils'
-import Isvg from 'react-inlinesvg'
-import { FaChain } from 'react-icons/lib/fa'
import Value from 'components/Value'
-import checkmarkIcon from 'icons/check_circle.svg'
import styles from '../Activity.scss'
const Transaction = ({