mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
network - use providerType for localhost
This commit is contained in:
parent
b2f02300a3
commit
5f1f345a5d
@ -1300,7 +1300,7 @@ function retryTransaction (txId) {
|
||||
|
||||
function setProviderType (type) {
|
||||
return (dispatch) => {
|
||||
log.debug(`background.setProviderType`)
|
||||
log.debug(`background.setProviderType`, type)
|
||||
background.setProviderType(type, (err, result) => {
|
||||
if (err) {
|
||||
log.error(err)
|
||||
@ -1321,13 +1321,14 @@ function updateProviderType (type) {
|
||||
}
|
||||
|
||||
function setRpcTarget (newRpc) {
|
||||
log.debug(`background.setRpcTarget: ${newRpc}`)
|
||||
return (dispatch) => {
|
||||
log.debug(`background.setRpcTarget: ${newRpc}`)
|
||||
background.setCustomRpc(newRpc, (err, result) => {
|
||||
if (err) {
|
||||
log.error(err)
|
||||
return dispatch(self.displayWarning('Had a problem changing networks!'))
|
||||
}
|
||||
dispatch(actions.setSelectedToken())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -203,18 +203,18 @@ NetworkDropdown.prototype.render = function () {
|
||||
{
|
||||
key: 'default',
|
||||
closeMenu: () => this.props.hideNetworkDropdown(),
|
||||
onClick: () => props.setRpcTarget('http://localhost:8545'),
|
||||
onClick: () => props.setProviderType('localhost'),
|
||||
style: dropdownMenuItemStyle,
|
||||
},
|
||||
[
|
||||
activeNetwork === 'http://localhost:8545' ? h('i.fa.fa-check') : h('.network-check__transparent', '✓'),
|
||||
providerType === 'localhost' ? h('i.fa.fa-check') : h('.network-check__transparent', '✓'),
|
||||
h(NetworkDropdownIcon, {
|
||||
isSelected: activeNetwork === 'http://localhost:8545',
|
||||
isSelected: providerType === 'localhost',
|
||||
innerBorder: '1px solid #9b9b9b',
|
||||
}),
|
||||
h('span.network-name-item', {
|
||||
style: {
|
||||
color: activeNetwork === 'http://localhost:8545' ? '#ffffff' : '#9b9b9b',
|
||||
color: providerType === 'localhost' ? '#ffffff' : '#9b9b9b',
|
||||
},
|
||||
}, this.context.t('localhost')),
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user