Update custom RPC network dropdown icons (#9764)

* Update custom RPC network dropdown icons

* Fix failing unit test
feature/default_network_editable
Erik Marks 4 years ago committed by GitHub
parent 907e8d6a77
commit ca7df8de0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      ui/app/components/app/dropdowns/network-dropdown.js
  2. 2
      ui/app/components/app/dropdowns/tests/network-dropdown.test.js

@ -106,7 +106,7 @@ class NetworkDropdown extends Component {
return reversedRpcListDetail.map((entry) => {
const { rpcUrl, chainId, ticker = 'ETH', nickname = '' } = entry
const currentRpcTarget = (
const isCurrentRpcTarget = (
provider.type === 'rpc' && rpcUrl === provider.rpcUrl
)
@ -128,15 +128,15 @@ class NetworkDropdown extends Component {
}}
>
{
currentRpcTarget
isCurrentRpcTarget
? <i className="fa fa-check" />
: <div className="network-check__transparent"></div>
}
<i className="fa fa-question-circle fa-med menu-icon-circle" />
<NetworkDropdownIcon backgroundColor="#d6d9dc" isSelected={isCurrentRpcTarget} />
<span
className="network-name-item"
style={{
color: currentRpcTarget
color: isCurrentRpcTarget
? '#ffffff'
: '#9b9b9b',
}}
@ -144,7 +144,7 @@ class NetworkDropdown extends Component {
{nickname || rpcUrl}
</span>
{
currentRpcTarget
isCurrentRpcTarget
? null
: (
<i

@ -91,7 +91,7 @@ describe('Network Dropdown', function () {
})
it('checks background color for sixth NetworkDropdownIcon', function () {
assert.equal(wrapper.find(NetworkDropdownIcon).at(5).prop('innerBorder'), '1px solid #9b9b9b')
assert.equal(wrapper.find(NetworkDropdownIcon).at(5).prop('backgroundColor'), '#d6d9dc') // "Custom network grey"
})
it('checks dropdown for frequestRPCList from state', function () {

Loading…
Cancel
Save