diff options
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r-- | ui/app/actions.js | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index 89a4fadfa..4154c002c 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -659,11 +659,19 @@ function markAccountsFound() { // function setRpcTarget (newRpc) { - log.debug(`background.setRpcTarget`) - background.setRpcTarget(newRpc) - return { - type: actions.SET_RPC_TARGET, - value: newRpc, + return (dispatch) => { + log.debug(`background.setRpcTarget`) + background.setRpcTarget(newRpc) + background.updateFrequentRpcList(newRpc, (frequentRpcList) => { + const value = { + rpcTarget: newRpc, + frequentRpcList, + } + dispatch({ + type: actions.SET_RPC_TARGET, + value, + }) + }) } } |