aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/identicon.js
diff options
context:
space:
mode:
authorKevin Serrano <kevin.serrano@consensys.net>2017-06-20 04:51:38 +0800
committerKevin Serrano <kevin.serrano@consensys.net>2017-06-20 04:51:38 +0800
commit9da243f42d7f9a1bfc868b9637774c6fbad6af53 (patch)
treef37cc44c80a3c22f11b46c527dee66454ed70867 /ui/app/components/identicon.js
parent7ec7e1226691474ea200ccf867f7a7d1f0c1086a (diff)
parent39c7ed230d61b04d147e45a55ac7af0576961968 (diff)
downloadtangerine-wallet-browser-9da243f42d7f9a1bfc868b9637774c6fbad6af53.tar
tangerine-wallet-browser-9da243f42d7f9a1bfc868b9637774c6fbad6af53.tar.gz
tangerine-wallet-browser-9da243f42d7f9a1bfc868b9637774c6fbad6af53.tar.bz2
tangerine-wallet-browser-9da243f42d7f9a1bfc868b9637774c6fbad6af53.tar.lz
tangerine-wallet-browser-9da243f42d7f9a1bfc868b9637774c6fbad6af53.tar.xz
tangerine-wallet-browser-9da243f42d7f9a1bfc868b9637774c6fbad6af53.tar.zst
tangerine-wallet-browser-9da243f42d7f9a1bfc868b9637774c6fbad6af53.zip
Merge branch 'AddTokenList' of github.com:MetaMask/metamask-plugin into AddTokenList
Diffstat (limited to 'ui/app/components/identicon.js')
-rw-r--r--ui/app/components/identicon.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/ui/app/components/identicon.js b/ui/app/components/identicon.js
index 9de854b54..c754bc6ba 100644
--- a/ui/app/components/identicon.js
+++ b/ui/app/components/identicon.js
@@ -23,7 +23,9 @@ IdenticonComponent.prototype.render = function () {
h('div', {
key: 'identicon-' + this.props.address,
style: {
- display: 'inline-block',
+ display: 'flex',
+ alignItems: 'center',
+ justifyContent: 'center',
height: diameter,
width: diameter,
borderRadius: diameter / 2,
@@ -35,21 +37,22 @@ IdenticonComponent.prototype.render = function () {
IdenticonComponent.prototype.componentDidMount = function () {
var props = this.props
- var address = props.address
+ const { address } = props
if (!address) return
var container = findDOMNode(this)
+
var diameter = props.diameter || this.defaultDiameter
if (!isNode) {
- var img = iconFactory.iconForAddress(address, diameter, false)
+ var img = iconFactory.iconForAddress(address, diameter)
container.appendChild(img)
}
}
IdenticonComponent.prototype.componentDidUpdate = function () {
var props = this.props
- var address = props.address
+ const { address } = props
if (!address) return
@@ -62,7 +65,8 @@ IdenticonComponent.prototype.componentDidUpdate = function () {
var diameter = props.diameter || this.defaultDiameter
if (!isNode) {
- var img = iconFactory.iconForAddress(address, diameter, false)
+ var img = iconFactory.iconForAddress(address, diameter)
container.appendChild(img)
}
}
+