aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-09-30 07:35:58 +0800
committerkumavis <aaron@kumavis.me>2017-09-30 07:35:58 +0800
commitd6ea2fa425c90f6e05d2d59d4a79f1b573cc2e06 (patch)
tree2e0f0873d8654972d8441e0fea055c7b32dc27cb /ui
parentb88d11f86ede907bdf51cd224e5ea6285e56147b (diff)
downloadtangerine-wallet-browser-d6ea2fa425c90f6e05d2d59d4a79f1b573cc2e06.tar
tangerine-wallet-browser-d6ea2fa425c90f6e05d2d59d4a79f1b573cc2e06.tar.gz
tangerine-wallet-browser-d6ea2fa425c90f6e05d2d59d4a79f1b573cc2e06.tar.bz2
tangerine-wallet-browser-d6ea2fa425c90f6e05d2d59d4a79f1b573cc2e06.tar.lz
tangerine-wallet-browser-d6ea2fa425c90f6e05d2d59d4a79f1b573cc2e06.tar.xz
tangerine-wallet-browser-d6ea2fa425c90f6e05d2d59d4a79f1b573cc2e06.tar.zst
tangerine-wallet-browser-d6ea2fa425c90f6e05d2d59d4a79f1b573cc2e06.zip
network - convert localhost from custom rpc to network type
Diffstat (limited to 'ui')
-rw-r--r--ui/app/actions.js23
-rw-r--r--ui/app/app.js2
2 files changed, 9 insertions, 16 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index e793e6a21..4844dd56e 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -126,7 +126,6 @@ var actions = {
showAddTokenPage,
addToken,
setRpcTarget: setRpcTarget,
- setDefaultRpcTarget: setDefaultRpcTarget,
setProviderType: setProviderType,
// loading overlay
SHOW_LOADING: 'SHOW_LOADING_INDICATION',
@@ -706,16 +705,19 @@ function markAccountsFound () {
// config
//
-// default rpc target refers to localhost:8545 in this instance.
-function setDefaultRpcTarget () {
- log.debug(`background.setDefaultRpcTarget`)
+function setProviderType (type) {
return (dispatch) => {
- background.setDefaultRpc((err, result) => {
+ log.debug(`background.setProviderType`)
+ background.setProviderType(type, (err, result) => {
if (err) {
log.error(err)
- return dispatch(self.displayWarning('Had a problem changing networks.'))
+ return dispatch(self.displayWarning('Had a problem changing networks!'))
}
})
+ return {
+ type: actions.SET_PROVIDER_TYPE,
+ value: type,
+ }
}
}
@@ -744,15 +746,6 @@ function addToAddressBook (recipient, nickname) {
}
}
-function setProviderType (type) {
- log.debug(`background.setProviderType`)
- background.setProviderType(type)
- return {
- type: actions.SET_PROVIDER_TYPE,
- value: type,
- }
-}
-
function useEtherscanProvider () {
log.debug(`background.useEtherscanProvider`)
background.useEtherscanProvider()
diff --git a/ui/app/app.js b/ui/app/app.js
index ee800ea90..50121b055 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -319,7 +319,7 @@ App.prototype.renderNetworkDropdown = function () {
{
key: 'default',
closeMenu: () => this.setState({ isNetworkMenuOpen: !isOpen }),
- onClick: () => props.dispatch(actions.setDefaultRpcTarget()),
+ onClick: () => props.dispatch(actions.setProviderType('localhost')),
style: {
fontSize: '18px',
},