Browse Source

Inline walletProps into mergeProps

More succinct and easier to find by grep.
renovate/lint-staged-8.x
Ben Woosley 7 years ago
parent
commit
49b1633341
No known key found for this signature in database GPG Key ID: 6EE5F3785F78B345
  1. 18
      app/routes/activity/containers/ActivityContainer.js

18
app/routes/activity/containers/ActivityContainer.js

@ -81,8 +81,12 @@ const mapStateToProps = state => ({
showPayLoadingScreen: payFormSelectors.showPayLoadingScreen(state) showPayLoadingScreen: payFormSelectors.showPayLoadingScreen(state)
}) })
const mergeProps = (stateProps, dispatchProps, ownProps) => { const mergeProps = (stateProps, dispatchProps, ownProps) => ({
const walletProps = { ...stateProps,
...dispatchProps,
...ownProps,
walletProps: {
balance: stateProps.balance, balance: stateProps.balance,
address: stateProps.address.address, address: stateProps.address.address,
info: stateProps.info, info: stateProps.info,
@ -102,14 +106,6 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => {
openPayForm: () => dispatchProps.setFormType('PAY_FORM'), openPayForm: () => dispatchProps.setFormType('PAY_FORM'),
openRequestForm: () => dispatchProps.setFormType('REQUEST_FORM') openRequestForm: () => dispatchProps.setFormType('REQUEST_FORM')
} }
})
return {
...stateProps,
...dispatchProps,
...ownProps,
walletProps
}
}
export default connect(mapStateToProps, mapDispatchToProps, mergeProps)(Activity) export default connect(mapStateToProps, mapDispatchToProps, mergeProps)(Activity)

Loading…
Cancel
Save