1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Update custom RPC network dropdown icons (#9764)

* Update custom RPC network dropdown icons

* Fix failing unit test
This commit is contained in:
Erik Marks 2020-10-30 12:22:04 -07:00 committed by GitHub
parent 907e8d6a77
commit ca7df8de0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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 () {