mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-27 10:48:22 +00:00
fix receive address eye icon and DeviceIcon
This commit is contained in:
parent
6a673d3d00
commit
71d348d9c2
@ -30,10 +30,20 @@ const DeviceIcon = ({
|
||||
color = COLORS.TEXT_SECONDARY,
|
||||
hoverColor,
|
||||
onClick,
|
||||
...rest
|
||||
}: Props) => {
|
||||
const majorVersion = device.features ? device.features.major_version : 2;
|
||||
const icon = getDeviceIcon(majorVersion);
|
||||
return <Icon icon={icon} hoverColor={hoverColor} onClick={onClick} color={color} size={size} />;
|
||||
return (
|
||||
<Icon
|
||||
icon={icon}
|
||||
hoverColor={hoverColor}
|
||||
onClick={onClick}
|
||||
color={color}
|
||||
size={size}
|
||||
{...rest}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
DeviceIcon.propTypes = {
|
||||
|
@ -78,7 +78,7 @@ const QrWrapper = styled.div`
|
||||
`;
|
||||
|
||||
const StyledDeviceIcon = styled(DeviceIcon)`
|
||||
margin-right: 6px;
|
||||
margin: 0 6px;
|
||||
`;
|
||||
|
||||
const AccountReceive = (props: Props) => {
|
||||
|
@ -59,9 +59,7 @@ const ShowAddressButton = styled(Button)`
|
||||
const EyeButton = styled(Button)`
|
||||
z-index: 10001;
|
||||
padding: 0;
|
||||
width: 30px;
|
||||
background: transparent;
|
||||
top: 5px;
|
||||
top: 12px;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
|
||||
@ -85,6 +83,10 @@ const QrWrapper = styled.div`
|
||||
flex-direction: column;
|
||||
`;
|
||||
|
||||
const StyledDeviceIcon = styled(DeviceIcon)`
|
||||
margin: 0 6px;
|
||||
`;
|
||||
|
||||
const AccountReceive = (props: Props) => {
|
||||
const device = props.wallet.selectedDevice;
|
||||
const { account, discovery, shouldRender } = props.selectedAccount;
|
||||
@ -124,7 +126,11 @@ const AccountReceive = (props: Props) => {
|
||||
trezorAction={
|
||||
isAddressVerifying ? (
|
||||
<React.Fragment>
|
||||
<DeviceIcon device={device} color={colors.WHITE} />
|
||||
<StyledDeviceIcon
|
||||
size={16}
|
||||
device={device}
|
||||
color={colors.WHITE}
|
||||
/>
|
||||
<FormattedMessage
|
||||
{...l10nReceiveMessages.TR_CHECK_ADDRESS_ON_TREZOR}
|
||||
/>
|
||||
@ -145,9 +151,11 @@ const AccountReceive = (props: Props) => {
|
||||
}
|
||||
>
|
||||
<EyeButton
|
||||
isTransparent
|
||||
onClick={() => props.showAddress(account.accountPath)}
|
||||
>
|
||||
<Icon
|
||||
size={16}
|
||||
icon={
|
||||
addressUnverified
|
||||
? ICONS.EYE_CROSSED
|
||||
|
Loading…
Reference in New Issue
Block a user