|
|
@ -31,7 +31,6 @@ const HDCreateVaultComplete = require('./keychains/hd/create-vault-complete') |
|
|
|
const HDRestoreVaultScreen = require('./keychains/hd/restore-vault') |
|
|
|
const HDRestoreVaultScreen = require('./keychains/hd/restore-vault') |
|
|
|
const RevealSeedConfirmation = require('./keychains/hd/recover-seed/confirmation') |
|
|
|
const RevealSeedConfirmation = require('./keychains/hd/recover-seed/confirmation') |
|
|
|
const AccountDropdowns = require('./components/account-dropdowns').AccountDropdowns |
|
|
|
const AccountDropdowns = require('./components/account-dropdowns').AccountDropdowns |
|
|
|
const ethUtil = require('ethereumjs-util') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = connect(mapStateToProps)(App) |
|
|
|
module.exports = connect(mapStateToProps)(App) |
|
|
|
|
|
|
|
|
|
|
@ -44,8 +43,7 @@ function mapStateToProps (state) { |
|
|
|
accounts, |
|
|
|
accounts, |
|
|
|
address, |
|
|
|
address, |
|
|
|
} = state.metamask |
|
|
|
} = state.metamask |
|
|
|
let selected = address || Object.keys(accounts)[0] |
|
|
|
const selected = address || Object.keys(accounts)[0] |
|
|
|
// let checksumAddress = selected && ethUtil.toChecksumAddress(selected)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
return { |
|
|
|
// state from plugin
|
|
|
|
// state from plugin
|
|
|
@ -252,7 +250,7 @@ App.prototype.renderNetworkDropdown = function () { |
|
|
|
closeMenu: () => this.setState({ isNetworkMenuOpen: !isOpen }), |
|
|
|
closeMenu: () => this.setState({ isNetworkMenuOpen: !isOpen }), |
|
|
|
onClick: () => props.dispatch(actions.setProviderType('mainnet')), |
|
|
|
onClick: () => props.dispatch(actions.setProviderType('mainnet')), |
|
|
|
style: { |
|
|
|
style: { |
|
|
|
fontSize: '18px' |
|
|
|
fontSize: '18px', |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
[ |
|
|
|
[ |
|
|
@ -269,7 +267,7 @@ App.prototype.renderNetworkDropdown = function () { |
|
|
|
closeMenu: () => this.setState({ isNetworkMenuOpen: !isOpen }), |
|
|
|
closeMenu: () => this.setState({ isNetworkMenuOpen: !isOpen }), |
|
|
|
onClick: () => props.dispatch(actions.setProviderType('ropsten')), |
|
|
|
onClick: () => props.dispatch(actions.setProviderType('ropsten')), |
|
|
|
style: { |
|
|
|
style: { |
|
|
|
fontSize: '18px' |
|
|
|
fontSize: '18px', |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
[ |
|
|
|
[ |
|
|
@ -286,7 +284,7 @@ App.prototype.renderNetworkDropdown = function () { |
|
|
|
closeMenu: () => this.setState({ isNetworkMenuOpen: !isOpen }), |
|
|
|
closeMenu: () => this.setState({ isNetworkMenuOpen: !isOpen }), |
|
|
|
onClick: () => props.dispatch(actions.setProviderType('kovan')), |
|
|
|
onClick: () => props.dispatch(actions.setProviderType('kovan')), |
|
|
|
style: { |
|
|
|
style: { |
|
|
|
fontSize: '18px' |
|
|
|
fontSize: '18px', |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
[ |
|
|
|
[ |
|
|
@ -303,7 +301,7 @@ App.prototype.renderNetworkDropdown = function () { |
|
|
|
closeMenu: () => this.setState({ isNetworkMenuOpen: !isOpen }), |
|
|
|
closeMenu: () => this.setState({ isNetworkMenuOpen: !isOpen }), |
|
|
|
onClick: () => props.dispatch(actions.setProviderType('rinkeby')), |
|
|
|
onClick: () => props.dispatch(actions.setProviderType('rinkeby')), |
|
|
|
style: { |
|
|
|
style: { |
|
|
|
fontSize: '18px' |
|
|
|
fontSize: '18px', |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
[ |
|
|
|
[ |
|
|
@ -320,7 +318,7 @@ App.prototype.renderNetworkDropdown = function () { |
|
|
|
closeMenu: () => this.setState({ isNetworkMenuOpen: !isOpen }), |
|
|
|
closeMenu: () => this.setState({ isNetworkMenuOpen: !isOpen }), |
|
|
|
onClick: () => props.dispatch(actions.setDefaultRpcTarget()), |
|
|
|
onClick: () => props.dispatch(actions.setDefaultRpcTarget()), |
|
|
|
style: { |
|
|
|
style: { |
|
|
|
fontSize: '18px' |
|
|
|
fontSize: '18px', |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
[ |
|
|
|
[ |
|
|
@ -339,7 +337,7 @@ App.prototype.renderNetworkDropdown = function () { |
|
|
|
closeMenu: () => this.setState({ isNetworkMenuOpen: !isOpen }), |
|
|
|
closeMenu: () => this.setState({ isNetworkMenuOpen: !isOpen }), |
|
|
|
onClick: () => this.props.dispatch(actions.showConfigPage()), |
|
|
|
onClick: () => this.props.dispatch(actions.showConfigPage()), |
|
|
|
style: { |
|
|
|
style: { |
|
|
|
fontSize: '18px' |
|
|
|
fontSize: '18px', |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
[ |
|
|
|
[ |
|
|
@ -625,7 +623,6 @@ App.prototype.renderCommonRpc = function (rpcList, provider) { |
|
|
|
if ((rpc === 'http://localhost:8545') || (rpc === rpcTarget)) { |
|
|
|
if ((rpc === 'http://localhost:8545') || (rpc === rpcTarget)) { |
|
|
|
return null |
|
|
|
return null |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
|
|
return h( |
|
|
|
return h( |
|
|
|
DropdownMenuItem, |
|
|
|
DropdownMenuItem, |
|
|
|
{ |
|
|
|
{ |
|
|
|