Merge pull request #207 from trezor/fix/discovery-status

discovery status css fix
pull/211/head
Vladimir Volek 6 years ago committed by GitHub
commit a40429f345
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -78,7 +78,7 @@ const AddAccountIconWrapper = styled.div`
const DiscoveryStatusWrapper = styled.div`
display: flex;
flex-direction: column;
width: 100%;
font-size: ${FONT_SIZE.SMALL};
padding: ${LEFT_NAVIGATION_ROW.PADDING};
white-space: nowrap;
@ -164,8 +164,7 @@ const AccountMenu = (props: Props) => {
let discoveryStatus = null;
const discovery = props.discovery.find(d => d.deviceState === selected.state && d.network === location.state.network);
if (discovery) {
if (discovery.completed) {
if (discovery && discovery.completed) {
// TODO: add only if last one is not empty
//if (selectedAccounts.length > 0 && selectedAccounts[selectedAccounts.length - 1])
const lastAccount = deviceAccounts[deviceAccounts.length - 1];
@ -206,7 +205,7 @@ const AccountMenu = (props: Props) => {
</Tooltip>
);
}
} else if (!selected.connected || !selected.available) {
} else if (!selected.connected) {
discoveryStatus = (
<Row>
<DiscoveryStatusWrapper>
@ -229,7 +228,7 @@ const AccountMenu = (props: Props) => {
</Row>
);
}
}
return (
<Wrapper>

Loading…
Cancel
Save