aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app
diff options
context:
space:
mode:
authorWhymarrh Whitby <whymarrh.whitby@gmail.com>2018-07-10 04:21:55 +0800
committerWhymarrh Whitby <whymarrh.whitby@gmail.com>2018-07-12 03:47:48 +0800
commit9bfcb9c505595cb2e539700433835f30c8bcf049 (patch)
tree5d292830479a1d4eee652afa3bc58d3a4feba304 /ui/app
parent94489b544ad4a68ddd961f8b549aaac8507266e6 (diff)
downloadtangerine-wallet-browser-9bfcb9c505595cb2e539700433835f30c8bcf049.tar.gz
tangerine-wallet-browser-9bfcb9c505595cb2e539700433835f30c8bcf049.tar.zst
tangerine-wallet-browser-9bfcb9c505595cb2e539700433835f30c8bcf049.zip
Remove unneeded MetaMaskConnect connect wrapper
Diffstat (limited to 'ui/app')
-rw-r--r--ui/app/components/pages/home.js2
-rw-r--r--ui/app/metamask-connect.js27
2 files changed, 1 insertions, 28 deletions
diff --git a/ui/app/components/pages/home.js b/ui/app/components/pages/home.js
index c53413d3b..d24d5cc55 100644
--- a/ui/app/components/pages/home.js
+++ b/ui/app/components/pages/home.js
@@ -1,6 +1,6 @@
const { Component } = require('react')
+const { connect } = require('react-redux')
const PropTypes = require('prop-types')
-const connect = require('../../metamask-connect')
const { Redirect, withRouter } = require('react-router-dom')
const { compose } = require('recompose')
const h = require('react-hyperscript')
diff --git a/ui/app/metamask-connect.js b/ui/app/metamask-connect.js
deleted file mode 100644
index 81fa7e403..000000000
--- a/ui/app/metamask-connect.js
+++ /dev/null
@@ -1,27 +0,0 @@
-const connect = require('react-redux').connect
-const t = require('../i18n-helper').getMessage
-
-const metamaskConnect = (mapStateToProps, mapDispatchToProps) => {
- return connect(
- _higherOrderMapStateToProps(mapStateToProps),
- mapDispatchToProps
- )
-}
-
-const _higherOrderMapStateToProps = (mapStateToProps) => {
- let _t
- let currentLocale
- return (state, ownProps = {}) => {
- const stateProps = mapStateToProps
- ? mapStateToProps(state, ownProps)
- : ownProps
- if (currentLocale !== state.metamask.currentLocale) {
- currentLocale = state.metamask.currentLocale
- _t = t.bind(null, state.localeMessages)
- }
- stateProps.t = _t
- return stateProps
- }
-}
-
-module.exports = metamaskConnect