mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-24 09:18:09 +00:00
added React.Fragment to Receive page
This commit is contained in:
parent
f32c2d351d
commit
33ba41e865
@ -159,73 +159,75 @@ const AccountReceive = (props: Props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Content>
|
<Content>
|
||||||
<H2>Receive Ethereum or tokens</H2>
|
<React.Fragment>
|
||||||
<AddressWrapper
|
<H2>Receive Ethereum or tokens</H2>
|
||||||
isShowingQrCode={addressVerified || addressUnverified}
|
<AddressWrapper
|
||||||
>
|
isShowingQrCode={addressVerified || addressUnverified}
|
||||||
{isAddressVerifying && (
|
|
||||||
<AddressInfoText>Confirm address on TREZOR</AddressInfoText>
|
|
||||||
)}
|
|
||||||
{((addressVerified || addressUnverified) && !isAddressVerifying) && (
|
|
||||||
<Tooltip
|
|
||||||
placement="left"
|
|
||||||
content={(
|
|
||||||
<VerifyAddressTooltip
|
|
||||||
isConnected={device.connected}
|
|
||||||
isAvailable={device.available}
|
|
||||||
addressUnverified={addressUnverified}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<EyeButton
|
|
||||||
isTransparent
|
|
||||||
onClick={() => props.showAddress(account.addressPath)}
|
|
||||||
>
|
|
||||||
|
|
||||||
<Icon
|
|
||||||
icon={addressUnverified ? ICONS.EYE_CROSSED : ICONS.EYE}
|
|
||||||
color={addressUnverified ? colors.ERROR_PRIMARY : colors.TEXT_PRIMARY}
|
|
||||||
/>
|
|
||||||
|
|
||||||
</EyeButton>
|
|
||||||
</Tooltip>
|
|
||||||
)}
|
|
||||||
<ValueWrapper
|
|
||||||
isHidden={isAddressHidden}
|
|
||||||
isVerifying={isAddressVerifying}
|
|
||||||
>
|
>
|
||||||
{address}
|
{isAddressVerifying && (
|
||||||
</ValueWrapper>
|
<AddressInfoText>Confirm address on TREZOR</AddressInfoText>
|
||||||
{isAddressVerifying && (
|
)}
|
||||||
<React.Fragment>
|
{((addressVerified || addressUnverified) && !isAddressVerifying) && (
|
||||||
<ArrowUp />
|
<Tooltip
|
||||||
<AddressInfoText>
|
placement="left"
|
||||||
<Icon
|
content={(
|
||||||
icon={ICONS.T1}
|
<VerifyAddressTooltip
|
||||||
color={colors.WHITE}
|
isConnected={device.connected}
|
||||||
|
isAvailable={device.available}
|
||||||
|
addressUnverified={addressUnverified}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
<EyeButton
|
||||||
|
isTransparent
|
||||||
|
onClick={() => props.showAddress(account.addressPath)}
|
||||||
|
>
|
||||||
|
|
||||||
|
<Icon
|
||||||
|
icon={addressUnverified ? ICONS.EYE_CROSSED : ICONS.EYE}
|
||||||
|
color={addressUnverified ? colors.ERROR_PRIMARY : colors.TEXT_PRIMARY}
|
||||||
|
/>
|
||||||
|
|
||||||
|
</EyeButton>
|
||||||
|
</Tooltip>
|
||||||
|
)}
|
||||||
|
<ValueWrapper
|
||||||
|
isHidden={isAddressHidden}
|
||||||
|
isVerifying={isAddressVerifying}
|
||||||
|
>
|
||||||
|
{address}
|
||||||
|
</ValueWrapper>
|
||||||
|
{isAddressVerifying && (
|
||||||
|
<React.Fragment>
|
||||||
|
<ArrowUp />
|
||||||
|
<AddressInfoText>
|
||||||
|
<Icon
|
||||||
|
icon={ICONS.T1}
|
||||||
|
color={colors.WHITE}
|
||||||
|
/>
|
||||||
|
Check address on your Trezor
|
||||||
|
</AddressInfoText>
|
||||||
|
</React.Fragment>
|
||||||
|
)}
|
||||||
|
{(addressVerified || addressUnverified) && (
|
||||||
|
<React.Fragment>
|
||||||
|
<Label>QR code</Label>
|
||||||
|
<StyledQRCode
|
||||||
|
bgColor="#FFFFFF"
|
||||||
|
fgColor="#000000"
|
||||||
|
level="Q"
|
||||||
|
style={{ width: 150 }}
|
||||||
|
value={account.address}
|
||||||
/>
|
/>
|
||||||
Check address on your Trezor
|
</React.Fragment>
|
||||||
</AddressInfoText>
|
)}
|
||||||
</React.Fragment>
|
{!(addressVerified || addressUnverified) && (
|
||||||
)}
|
<ShowAddressButton onClick={() => props.showAddress(account.addressPath)} isDisabled={device.connected && !discovery.completed}>
|
||||||
{(addressVerified || addressUnverified) && (
|
<ShowAddressIcon icon={ICONS.EYE} color={colors.WHITE} />Show full address
|
||||||
<React.Fragment>
|
</ShowAddressButton>
|
||||||
<Label>QR code</Label>
|
)}
|
||||||
<StyledQRCode
|
</AddressWrapper>
|
||||||
bgColor="#FFFFFF"
|
</React.Fragment>
|
||||||
fgColor="#000000"
|
|
||||||
level="Q"
|
|
||||||
style={{ width: 150 }}
|
|
||||||
value={account.address}
|
|
||||||
/>
|
|
||||||
</React.Fragment>
|
|
||||||
)}
|
|
||||||
{!(addressVerified || addressUnverified) && (
|
|
||||||
<ShowAddressButton onClick={() => props.showAddress(account.addressPath)} isDisabled={device.connected && !discovery.completed}>
|
|
||||||
<ShowAddressIcon icon={ICONS.EYE} color={colors.WHITE} />Show full address
|
|
||||||
</ShowAddressButton>
|
|
||||||
)}
|
|
||||||
</AddressWrapper>
|
|
||||||
</Content>
|
</Content>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user