mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix identicon rendering
This commit is contained in:
parent
28eec68f85
commit
ed3814bff8
@ -16,8 +16,8 @@ function IdenticonComponent () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IdenticonComponent.prototype.render = function () {
|
IdenticonComponent.prototype.render = function () {
|
||||||
var state = this.props
|
var props = this.props
|
||||||
var diameter = state.diameter || this.defaultDiameter
|
var diameter = props.diameter || this.defaultDiameter
|
||||||
return (
|
return (
|
||||||
h('div', {
|
h('div', {
|
||||||
key: 'identicon-' + this.props.address,
|
key: 'identicon-' + this.props.address,
|
||||||
@ -33,15 +33,14 @@ IdenticonComponent.prototype.render = function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IdenticonComponent.prototype.componentDidMount = function () {
|
IdenticonComponent.prototype.componentDidMount = function () {
|
||||||
var state = this.props
|
var props = this.props
|
||||||
var address = state.address
|
var address = props.address
|
||||||
|
|
||||||
if (!address) return
|
if (!address) return
|
||||||
|
|
||||||
var container = findDOMNode(this)
|
var container = findDOMNode(this)
|
||||||
var diameter = state.diameter || this.defaultDiameter
|
var diameter = props.diameter || this.defaultDiameter
|
||||||
var imageify = state.imageify === undefined ? true : state.imageify
|
var img = iconFactory.iconForAddress(address, diameter, false)
|
||||||
var img = iconFactory.iconForAddress(address, diameter, imageify)
|
|
||||||
container.appendChild(img)
|
container.appendChild(img)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user