diff --git a/app/scripts/controllers/preferences.js b/app/scripts/controllers/preferences.js index 7456a7a7c..1b85e4fd1 100644 --- a/app/scripts/controllers/preferences.js +++ b/app/scripts/controllers/preferences.js @@ -322,7 +322,7 @@ class PreferencesController { /** * Returns an updated rpcList based on the passed url and the current list. - * The returned list will have a max length of 2. If the _url currently exists it the list, it will be moved to the + * The returned list will have a max length of 3. If the _url currently exists it the list, it will be moved to the * end of the list. The current list is modified and returned as a promise. * * @param {string} _url The rpc url to add to the frequentRpcList. diff --git a/old-ui/app/components/app-bar.js b/old-ui/app/components/app-bar.js index 684dfbe19..234c06a01 100644 --- a/old-ui/app/components/app-bar.js +++ b/old-ui/app/components/app-bar.js @@ -352,8 +352,9 @@ module.exports = class AppBar extends Component { renderCommonRpc (rpcList, provider) { const {dispatch} = this.props + const reversedRpcList = rpcList.slice().reverse() - return rpcList.map((rpc) => { + return reversedRpcList.map((rpc) => { const currentRpcTarget = provider.type === 'rpc' && rpc === provider.rpcTarget if ((rpc === LOCALHOST_RPC_URL) || currentRpcTarget) { diff --git a/ui/app/components/dropdowns/network-dropdown.js b/ui/app/components/dropdowns/network-dropdown.js index b1aeed376..63a30dd82 100644 --- a/ui/app/components/dropdowns/network-dropdown.js +++ b/ui/app/components/dropdowns/network-dropdown.js @@ -272,8 +272,9 @@ NetworkDropdown.prototype.getNetworkName = function () { NetworkDropdown.prototype.renderCommonRpc = function (rpcList, provider) { const props = this.props + const reversedRpcList = rpcList.slice().reverse() - return rpcList.map((rpc) => { + return reversedRpcList.map((rpc) => { const currentRpcTarget = provider.type === 'rpc' && rpc === provider.rpcTarget if ((rpc === 'http://localhost:8545') || currentRpcTarget) { @@ -302,7 +303,7 @@ NetworkDropdown.prototype.renderCommonRpc = function (rpcList, provider) { ] ) } - }).reverse() + }) } NetworkDropdown.prototype.renderCustomOption = function (provider) {