1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 12:29:06 +01:00

fix watched asset image rendering on confirm transaction header

This commit is contained in:
Esteban MIno 2018-08-30 12:59:44 -03:00
parent 07cb6adc31
commit 208312b239
2 changed files with 5 additions and 1 deletions

View File

@ -74,6 +74,7 @@ export default class ConfirmPageContainer extends Component {
assetImage,
warning,
} = this.props
const renderAssetImage = contentComponent || (!contentComponent && !identiconAddress)
return (
<div className="page-container">
@ -86,6 +87,7 @@ export default class ConfirmPageContainer extends Component {
senderAddress={fromAddress}
recipientName={toName}
recipientAddress={toAddress}
assetImage={renderAssetImage ? assetImage : undefined}
/>
</ConfirmPageContainerHeader>
{

View File

@ -20,6 +20,7 @@ export default class SenderToRecipient extends PureComponent {
t: PropTypes.func,
variant: PropTypes.oneOf([DEFAULT_VARIANT, CARDS_VARIANT]),
addressOnly: PropTypes.bool,
assetImage: PropTypes.string,
}
static defaultProps = {
@ -66,13 +67,14 @@ export default class SenderToRecipient extends PureComponent {
}
renderRecipientIdenticon () {
const { recipientAddress } = this.props
const { recipientAddress, assetImage } = this.props
return !this.props.addressOnly && (
<div className="sender-to-recipient__sender-icon">
<Identicon
address={recipientAddress}
diameter={24}
image={assetImage}
/>
</div>
)