Remove unneeded setrpc method.

feature/default_network_editable
Kevin Serrano 8 years ago
parent cf2268c3d2
commit 0ee8ca178e
No known key found for this signature in database
GPG Key ID: 7CC862A58D2889B4
  1. 28
      ui/app/actions.js

@ -680,31 +680,19 @@ function setDefaultRpcTarget (rpcList) {
console.error(err) console.error(err)
return dispatch(self.displayWarning('Had a problem changing networks.')) return dispatch(self.displayWarning('Had a problem changing networks.'))
} }
dispatch(self.setRpc(result))
}) })
} }
} }
function setRpcTarget (newRpc) { function setRpcTarget (newRpc) {
log.debug(`background.setRpcTarget`) log.debug(`background.setRpcTarget`)
return (dispatch) => { return (dispatch) => {
background.setCustomRpc(newRpc, (err, result) => { background.setCustomRpc(newRpc, (err, result) => {
if (err) { if (err) {
console.err(err) console.err(err)
return dispatch(self.displayWarning('Had a problem changing networks!')) return dispatch(self.displayWarning('Had a problem changing networks!'))
} }
dispatch(self.setRpc(result)) })
})
}
}
function setRpc (newRpc) {
return {
type: actions.SET_RPC_TARGET,
value: 'http://localhost:8545',
} }
} }

Loading…
Cancel
Save