diff options
author | Alexander Tseung <alextsg@gmail.com> | 2017-12-04 16:06:09 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@gmail.com> | 2017-12-15 06:11:23 +0800 |
commit | ec5e0a711cac3d35afcb1ecf5881f11adb4b3a06 (patch) | |
tree | 489d972e1c4481e9ec600d5e5c6b806aab31347f | |
parent | dde39e82b5723ba8056b73f0f823d40c3e702a99 (diff) | |
download | tangerine-wallet-browser-ec5e0a711cac3d35afcb1ecf5881f11adb4b3a06.tar tangerine-wallet-browser-ec5e0a711cac3d35afcb1ecf5881f11adb4b3a06.tar.gz tangerine-wallet-browser-ec5e0a711cac3d35afcb1ecf5881f11adb4b3a06.tar.bz2 tangerine-wallet-browser-ec5e0a711cac3d35afcb1ecf5881f11adb4b3a06.tar.lz tangerine-wallet-browser-ec5e0a711cac3d35afcb1ecf5881f11adb4b3a06.tar.xz tangerine-wallet-browser-ec5e0a711cac3d35afcb1ecf5881f11adb4b3a06.tar.zst tangerine-wallet-browser-ec5e0a711cac3d35afcb1ecf5881f11adb4b3a06.zip |
Fix lint errors
-rw-r--r-- | ui/app/app.js | 54 | ||||
-rw-r--r-- | ui/app/components/tx-list.js | 2 | ||||
-rw-r--r-- | ui/app/components/wallet-view.js | 1 | ||||
-rw-r--r-- | ui/app/main-container.js | 1 |
4 files changed, 44 insertions, 14 deletions
diff --git a/ui/app/app.js b/ui/app/app.js index 68384f30d..3f6795386 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -1,6 +1,7 @@ const { Component } = require('react') +const PropTypes = require('prop-types') const { connect } = require('react-redux') -const { Switch, Route, Redirect, withRouter } = require('react-router-dom') +const { Switch, Redirect, withRouter } = require('react-router-dom') const { compose } = require('recompose') const h = require('react-hyperscript') const actions = require('./actions') @@ -16,8 +17,6 @@ const NewKeyChainScreen = require('./new-keychain') const MainContainer = require('./main-container') const SendTransactionScreen2 = require('./components/send/send-v2-container') const ConfirmTxScreen = require('./conf-tx') -// notice -const generateLostAccountsNotice = require('../lib/lost-accounts-notice') // slideout menu const WalletView = require('./components/wallet-view') @@ -112,9 +111,15 @@ class App extends Component { } render () { - var props = this.props - const { isLoading, loadingMessage, network } = props - const isLoadingNetwork = network === 'loading' && props.currentView.name !== 'config' + const { + isLoading, + loadingMessage, + network, + provider, + frequentRpcList, + currentView, + } = this.props + const isLoadingNetwork = network === 'loading' && currentView.name !== 'config' const loadMessage = loadingMessage || isLoadingNetwork ? `Connecting to ${this.getNetworkName()}` : null log.debug('Main ui render function') @@ -139,8 +144,8 @@ class App extends Component { // network dropdown h(NetworkDropdown, { - provider: this.props.provider, - frequentRpcList: this.props.frequentRpcList, + provider, + frequentRpcList, }, []), h(AccountMenu), @@ -153,7 +158,6 @@ class App extends Component { // content this.renderRoutes(), - // this.renderPrimary(), ]) ) } @@ -337,8 +341,6 @@ class App extends Component { renderPrimary () { log.debug('rendering primary') const { - isMascara, - isOnboarding, noActiveNotices, lostAccounts, isInitialized, @@ -558,6 +560,36 @@ class App extends Component { } } +App.propTypes = { + currentCurrency: PropTypes.string, + setCurrentCurrencyToUSD: PropTypes.func, + isLoading: PropTypes.bool, + loadingMessage: PropTypes.string, + network: PropTypes.string, + provider: PropTypes.object, + frequentRpcList: PropTypes.array, + currentView: PropTypes.object, + sidebarOpen: PropTypes.bool, + hideSidebar: PropTypes.func, + isMascara: PropTypes.bool, + isOnboarding: PropTypes.bool, + isUnlocked: PropTypes.bool, + networkDropdownOpen: PropTypes.bool, + showNetworkDropdown: PropTypes.func, + hideNetworkDropdown: PropTypes.func, + history: PropTypes.object, + dispatch: PropTypes.func, + toggleAccountMenu: PropTypes.func, + selectedAddress: PropTypes.string, + noActiveNotices: PropTypes.bool, + lostAccounts: PropTypes.array, + isInitialized: PropTypes.bool, + forgottenPassword: PropTypes.bool, + activeAddress: PropTypes.string, + unapprovedTxs: PropTypes.object, + seedWords: PropTypes.string, +} + function mapStateToProps (state) { const { appState, metamask } = state const { diff --git a/ui/app/components/tx-list.js b/ui/app/components/tx-list.js index 6f18ea814..2c4c3dd31 100644 --- a/ui/app/components/tx-list.js +++ b/ui/app/components/tx-list.js @@ -94,7 +94,7 @@ TxList.prototype.renderTransactionListItem = function (transaction, conversionRa transactionHash, transactionNetworkId, } = props - const { showConfTxPage, history } = this.props + const { history } = this.props const opts = { key: transActionId || transactionHash, diff --git a/ui/app/components/wallet-view.js b/ui/app/components/wallet-view.js index 3b4443ef6..72ffc5d65 100644 --- a/ui/app/components/wallet-view.js +++ b/ui/app/components/wallet-view.js @@ -94,7 +94,6 @@ WalletView.prototype.render = function () { keyrings, showAccountDetailModal, hideSidebar, - showAddTokenPage, history, } = this.props // temporary logs + fake extra wallets diff --git a/ui/app/main-container.js b/ui/app/main-container.js index ad50ee13d..fabf4e563 100644 --- a/ui/app/main-container.js +++ b/ui/app/main-container.js @@ -2,7 +2,6 @@ const Component = require('react').Component const h = require('react-hyperscript') const inherits = require('util').inherits const AccountAndTransactionDetails = require('./account-and-transaction-details') -const UnlockScreen = require('./components/pages/unauthenticated/unlock') module.exports = MainContainer |