Fix lint errors
This commit is contained in:
parent
dde39e82b5
commit
ec5e0a711c
|
@ -1,6 +1,7 @@
|
||||||
const { Component } = require('react')
|
const { Component } = require('react')
|
||||||
|
const PropTypes = require('prop-types')
|
||||||
const { connect } = require('react-redux')
|
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 { compose } = require('recompose')
|
||||||
const h = require('react-hyperscript')
|
const h = require('react-hyperscript')
|
||||||
const actions = require('./actions')
|
const actions = require('./actions')
|
||||||
|
@ -16,8 +17,6 @@ const NewKeyChainScreen = require('./new-keychain')
|
||||||
const MainContainer = require('./main-container')
|
const MainContainer = require('./main-container')
|
||||||
const SendTransactionScreen2 = require('./components/send/send-v2-container')
|
const SendTransactionScreen2 = require('./components/send/send-v2-container')
|
||||||
const ConfirmTxScreen = require('./conf-tx')
|
const ConfirmTxScreen = require('./conf-tx')
|
||||||
// notice
|
|
||||||
const generateLostAccountsNotice = require('../lib/lost-accounts-notice')
|
|
||||||
|
|
||||||
// slideout menu
|
// slideout menu
|
||||||
const WalletView = require('./components/wallet-view')
|
const WalletView = require('./components/wallet-view')
|
||||||
|
@ -112,9 +111,15 @@ class App extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
var props = this.props
|
const {
|
||||||
const { isLoading, loadingMessage, network } = props
|
isLoading,
|
||||||
const isLoadingNetwork = network === 'loading' && props.currentView.name !== 'config'
|
loadingMessage,
|
||||||
|
network,
|
||||||
|
provider,
|
||||||
|
frequentRpcList,
|
||||||
|
currentView,
|
||||||
|
} = this.props
|
||||||
|
const isLoadingNetwork = network === 'loading' && currentView.name !== 'config'
|
||||||
const loadMessage = loadingMessage || isLoadingNetwork ?
|
const loadMessage = loadingMessage || isLoadingNetwork ?
|
||||||
`Connecting to ${this.getNetworkName()}` : null
|
`Connecting to ${this.getNetworkName()}` : null
|
||||||
log.debug('Main ui render function')
|
log.debug('Main ui render function')
|
||||||
|
@ -139,8 +144,8 @@ class App extends Component {
|
||||||
|
|
||||||
// network dropdown
|
// network dropdown
|
||||||
h(NetworkDropdown, {
|
h(NetworkDropdown, {
|
||||||
provider: this.props.provider,
|
provider,
|
||||||
frequentRpcList: this.props.frequentRpcList,
|
frequentRpcList,
|
||||||
}, []),
|
}, []),
|
||||||
|
|
||||||
h(AccountMenu),
|
h(AccountMenu),
|
||||||
|
@ -153,7 +158,6 @@ class App extends Component {
|
||||||
|
|
||||||
// content
|
// content
|
||||||
this.renderRoutes(),
|
this.renderRoutes(),
|
||||||
// this.renderPrimary(),
|
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -337,8 +341,6 @@ class App extends Component {
|
||||||
renderPrimary () {
|
renderPrimary () {
|
||||||
log.debug('rendering primary')
|
log.debug('rendering primary')
|
||||||
const {
|
const {
|
||||||
isMascara,
|
|
||||||
isOnboarding,
|
|
||||||
noActiveNotices,
|
noActiveNotices,
|
||||||
lostAccounts,
|
lostAccounts,
|
||||||
isInitialized,
|
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) {
|
function mapStateToProps (state) {
|
||||||
const { appState, metamask } = state
|
const { appState, metamask } = state
|
||||||
const {
|
const {
|
||||||
|
|
|
@ -94,7 +94,7 @@ TxList.prototype.renderTransactionListItem = function (transaction, conversionRa
|
||||||
transactionHash,
|
transactionHash,
|
||||||
transactionNetworkId,
|
transactionNetworkId,
|
||||||
} = props
|
} = props
|
||||||
const { showConfTxPage, history } = this.props
|
const { history } = this.props
|
||||||
|
|
||||||
const opts = {
|
const opts = {
|
||||||
key: transActionId || transactionHash,
|
key: transActionId || transactionHash,
|
||||||
|
|
|
@ -94,7 +94,6 @@ WalletView.prototype.render = function () {
|
||||||
keyrings,
|
keyrings,
|
||||||
showAccountDetailModal,
|
showAccountDetailModal,
|
||||||
hideSidebar,
|
hideSidebar,
|
||||||
showAddTokenPage,
|
|
||||||
history,
|
history,
|
||||||
} = this.props
|
} = this.props
|
||||||
// temporary logs + fake extra wallets
|
// temporary logs + fake extra wallets
|
||||||
|
|
|
@ -2,7 +2,6 @@ const Component = require('react').Component
|
||||||
const h = require('react-hyperscript')
|
const h = require('react-hyperscript')
|
||||||
const inherits = require('util').inherits
|
const inherits = require('util').inherits
|
||||||
const AccountAndTransactionDetails = require('./account-and-transaction-details')
|
const AccountAndTransactionDetails = require('./account-and-transaction-details')
|
||||||
const UnlockScreen = require('./components/pages/unauthenticated/unlock')
|
|
||||||
|
|
||||||
module.exports = MainContainer
|
module.exports = MainContainer
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue