mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
backported RPC improvements to oldui
This commit is contained in:
parent
b23cca1469
commit
c0b5e8a088
@ -350,11 +350,13 @@ module.exports = class AppBar extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
renderCommonRpc (rpcList, {rpcTarget}) {
|
renderCommonRpc (rpcList, provider) {
|
||||||
const {dispatch} = this.props
|
const {dispatch} = this.props
|
||||||
|
|
||||||
return rpcList.map((rpc) => {
|
return rpcList.map((rpc) => {
|
||||||
if ((rpc === LOCALHOST_RPC_URL) || (rpc === rpcTarget)) {
|
const currentRpcTarget = provider.type === 'rpc' && rpc === provider.rpcTarget
|
||||||
|
|
||||||
|
if ((rpc === LOCALHOST_RPC_URL) || currentRpcTarget) {
|
||||||
return null
|
return null
|
||||||
} else {
|
} else {
|
||||||
return h(DropdownMenuItem, {
|
return h(DropdownMenuItem, {
|
||||||
@ -364,7 +366,7 @@ module.exports = class AppBar extends Component {
|
|||||||
}, [
|
}, [
|
||||||
h('i.fa.fa-question-circle.fa-lg.menu-icon'),
|
h('i.fa.fa-question-circle.fa-lg.menu-icon'),
|
||||||
rpc,
|
rpc,
|
||||||
rpcTarget === rpc
|
currentRpcTarget
|
||||||
? h('.check', '✓')
|
? h('.check', '✓')
|
||||||
: null,
|
: null,
|
||||||
])
|
])
|
||||||
|
@ -272,10 +272,9 @@ NetworkDropdown.prototype.getNetworkName = function () {
|
|||||||
|
|
||||||
NetworkDropdown.prototype.renderCommonRpc = function (rpcList, provider) {
|
NetworkDropdown.prototype.renderCommonRpc = function (rpcList, provider) {
|
||||||
const props = this.props
|
const props = this.props
|
||||||
const rpcTarget = provider.rpcTarget
|
|
||||||
|
|
||||||
return rpcList.map((rpc) => {
|
return rpcList.map((rpc) => {
|
||||||
const currentRpcTarget = provider.type === 'rpc' && rpc === rpcTarget
|
const currentRpcTarget = provider.type === 'rpc' && rpc === provider.rpcTarget
|
||||||
|
|
||||||
if ((rpc === 'http://localhost:8545') || currentRpcTarget) {
|
if ((rpc === 'http://localhost:8545') || currentRpcTarget) {
|
||||||
return null
|
return null
|
||||||
|
Loading…
Reference in New Issue
Block a user