Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update custom RPC network dropdown icons #9764

Merged
merged 2 commits into from
Oct 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions ui/app/components/app/dropdowns/network-dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand All @@ -128,23 +128,23 @@ 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',
}}
>
{nickname || rpcUrl}
</span>
{
currentRpcTarget
isCurrentRpcTarget
? null
: (
<i
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down