diff options
author | Sergey Ukustov <sergey@ukstv.me> | 2017-10-03 07:10:47 +0800 |
---|---|---|
committer | Sergey Ukustov <sergey@ukstv.me> | 2017-10-03 07:10:47 +0800 |
commit | e11ca1289019123cd143adcb6312186452630723 (patch) | |
tree | 4debbc517ee74b3bc307def4f64aa98907571167 /ui | |
parent | 82d1f391986ac6f7cb7d9029f50d44b5a8c9442b (diff) | |
parent | b7c195160238119291ce62b01db1c8f7e4f94568 (diff) | |
download | tangerine-wallet-browser-e11ca1289019123cd143adcb6312186452630723.tar tangerine-wallet-browser-e11ca1289019123cd143adcb6312186452630723.tar.gz tangerine-wallet-browser-e11ca1289019123cd143adcb6312186452630723.tar.bz2 tangerine-wallet-browser-e11ca1289019123cd143adcb6312186452630723.tar.lz tangerine-wallet-browser-e11ca1289019123cd143adcb6312186452630723.tar.xz tangerine-wallet-browser-e11ca1289019123cd143adcb6312186452630723.tar.zst tangerine-wallet-browser-e11ca1289019123cd143adcb6312186452630723.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/actions.js | 33 | ||||
-rw-r--r-- | ui/app/app.js | 2 |
2 files changed, 9 insertions, 26 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index 84a1b8dcc..84990922e 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -121,14 +121,11 @@ var actions = { SET_RPC_TARGET: 'SET_RPC_TARGET', SET_DEFAULT_RPC_TARGET: 'SET_DEFAULT_RPC_TARGET', SET_PROVIDER_TYPE: 'SET_PROVIDER_TYPE', - USE_ETHERSCAN_PROVIDER: 'USE_ETHERSCAN_PROVIDER', - useEtherscanProvider: useEtherscanProvider, showConfigPage, SHOW_ADD_TOKEN_PAGE: 'SHOW_ADD_TOKEN_PAGE', showAddTokenPage, addToken, setRpcTarget: setRpcTarget, - setDefaultRpcTarget: setDefaultRpcTarget, setProviderType: setProviderType, // loading overlay SHOW_LOADING: 'SHOW_LOADING_INDICATION', @@ -733,16 +730,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, + } } } @@ -771,23 +771,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() - return { - type: actions.USE_ETHERSCAN_PROVIDER, - } -} - function showLoadingIndication (message) { return { type: actions.SHOW_LOADING, 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', }, |