mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
updated docs, small improvement of recent RPC rendering
This commit is contained in:
parent
c0b5e8a088
commit
9a80d6e859
@ -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.
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user