From df3169d1c7250d13bb8bc123dc91f7913ad75a81 Mon Sep 17 00:00:00 2001 From: Frankie Date: Tue, 29 Jan 2019 08:13:51 -1000 Subject: I#5956 fix2 dont overwrite existing rpc settings (#6044) * mm-controller - dont overwrite existing rpc settings * ui-networkDropdown - dont pass old network as chainId * add methods preferencesController.updateRpc and metamaskController.updateAndSetCustomRpc * use updateAndSetCustomRpc in settings to allow rpcs to be updated * use new rpc as nickname if no nick name has been supplied * fix update rpc method --- ui/app/components/dropdowns/network-dropdown.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ui/app/components/dropdowns') diff --git a/ui/app/components/dropdowns/network-dropdown.js b/ui/app/components/dropdowns/network-dropdown.js index d4cc695a6..6e002219a 100644 --- a/ui/app/components/dropdowns/network-dropdown.js +++ b/ui/app/components/dropdowns/network-dropdown.js @@ -277,7 +277,6 @@ NetworkDropdown.prototype.getNetworkName = function () { NetworkDropdown.prototype.renderCommonRpc = function (rpcListDetail, provider) { const props = this.props const reversedRpcListDetail = rpcListDetail.slice().reverse() - const network = props.network return reversedRpcListDetail.map((entry) => { const rpc = entry.rpcUrl @@ -288,7 +287,7 @@ NetworkDropdown.prototype.renderCommonRpc = function (rpcListDetail, provider) { if ((rpc === 'http://localhost:8545') || currentRpcTarget) { return null } else { - const chainId = entry.chainId || network + const chainId = entry.chainId return h( DropdownMenuItem, { -- cgit v1.2.3