Skip to content
This repository was archived by the owner on Sep 5, 2020. It is now read-only.

Commit 30d7e41

Browse files
wolovimevertonfraga
authored andcommitted
Fixes identicon image (#4124)
1 parent c620110 commit 30d7e41

File tree

1 file changed

+7
-17
lines changed

1 file changed

+7
-17
lines changed

interface/components/DappIdenticon.js

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,11 @@ export default class DappIdenticon extends Component {
4141
.toDataURL();
4242
}
4343

44-
renderLink() {
45-
/*
46-
return (
47-
<a href="{{link}}" class="dapp-identicon {{class}}" style="background-image: url('{{identiconData identity}}')" title={{i18nTextIcon}}>
48-
<img src="{{identiconDataPixel identity}}" class='identicon-pixel'>
49-
</a>
50-
)
51-
*/
52-
}
53-
5444
render() {
55-
if (!this.props.identity) {
56-
return null;
57-
}
45+
const { identity } = this.props;
5846

59-
if (this.props.link) {
60-
return this.renderLink();
47+
if (!identity) {
48+
return null;
6149
}
6250

6351
// dapp class sizes: large, medium, small, tiny
@@ -66,11 +54,13 @@ export default class DappIdenticon extends Component {
6654
className={`dapp-identicon dapp-${this.props.size}`}
6755
title={i18n.t('elements.identiconHelper')}
6856
style={{
69-
backgroundImage: `url('${this.identiconData(this.props.identity)}')`
57+
backgroundImage: `url('${this.identiconData(
58+
identity.toLowerCase()
59+
)}')`
7060
}}
7161
>
7262
<img
73-
src={this.identiconDataPixel(this.props.identity.toLowerCase())}
63+
src={this.identiconDataPixel(identity.toLowerCase())}
7464
className="identicon-pixel"
7565
/>
7666
</span>

0 commit comments

Comments
 (0)