aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-03-31 01:59:39 +0800
committerkumavis <aaron@kumavis.me>2018-03-31 01:59:39 +0800
commit5f1f345a5d7f428c939a6ab3cbf9d5ac56cb58ed (patch)
treedcff6e80f28683d82fb12f7cf02bae24be7ee30d /ui/app
parentb2f02300a3ba098c84b385523aeaf1f09fe22f8e (diff)
downloadtangerine-wallet-browser-5f1f345a5d7f428c939a6ab3cbf9d5ac56cb58ed.tar
tangerine-wallet-browser-5f1f345a5d7f428c939a6ab3cbf9d5ac56cb58ed.tar.gz
tangerine-wallet-browser-5f1f345a5d7f428c939a6ab3cbf9d5ac56cb58ed.tar.bz2
tangerine-wallet-browser-5f1f345a5d7f428c939a6ab3cbf9d5ac56cb58ed.tar.lz
tangerine-wallet-browser-5f1f345a5d7f428c939a6ab3cbf9d5ac56cb58ed.tar.xz
tangerine-wallet-browser-5f1f345a5d7f428c939a6ab3cbf9d5ac56cb58ed.tar.zst
tangerine-wallet-browser-5f1f345a5d7f428c939a6ab3cbf9d5ac56cb58ed.zip
network - use providerType for localhost
Diffstat (limited to 'ui/app')
-rw-r--r--ui/app/actions.js5
-rw-r--r--ui/app/components/dropdowns/network-dropdown.js8
2 files changed, 7 insertions, 6 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 58240054d..ad4270cef 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -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())
})
}
}
diff --git a/ui/app/components/dropdowns/network-dropdown.js b/ui/app/components/dropdowns/network-dropdown.js
index 94e5d967b..9e47f38ef 100644
--- a/ui/app/components/dropdowns/network-dropdown.js
+++ b/ui/app/components/dropdowns/network-dropdown.js
@@ -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')),
]