aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app')
-rw-r--r--ui/app/actions.js30
-rw-r--r--ui/app/reducers/metamask.js1
2 files changed, 10 insertions, 21 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 4172ea5df..2fc0d3523 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -674,33 +674,21 @@ function markAccountsFound() {
// default rpc target refers to localhost:8545 in this instance.
function setDefaultRpcTarget (rpcList) {
log.debug(`background.setDefaultRpcTarget`)
- background.setRpcTarget('http://localhost:8545')
- return (dispatch) => {
- dispatch({
- type: actions.SET_RPC_TARGET,
- value: 'http://localhost:8545',
- })
- dispatch({
- type: actions.SET_RPC_LIST,
- value: rpcList,
- })
+ background.setDefaultRpc()
+ return {
+ type: actions.SET_RPC_TARGET,
+ value: 'http://localhost:8545',
}
}
function setRpcTarget (newRpc) {
return (dispatch) => {
log.debug(`background.setRpcTarget`)
- background.setRpcTarget(newRpc)
- background.updateFrequentRpcList(newRpc, (rpcList) => {
- dispatch({
- type: actions.SET_RPC_TARGET,
- value: newRpc,
- })
- dispatch({
- type: actions.SET_RPC_LIST,
- value: rpcList,
- })
- })
+ background.setCustomRpc(newRpc)
+ return {
+ type: actions.SET_RPC_TARGET,
+ value: newRpc,
+ }
}
}
diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js
index c09556c91..a3c07d977 100644
--- a/ui/app/reducers/metamask.js
+++ b/ui/app/reducers/metamask.js
@@ -18,6 +18,7 @@ function reduceMetamask (state, action) {
conversionDate: 'N/A',
noActiveNotices: true,
lastUnreadNotice: undefined,
+ frequentRpcList: [],
}, state.metamask)
switch (action.type) {