aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/identicon.js
diff options
context:
space:
mode:
authorThomas Huang <thomas.b.huang@gmail.com>2017-06-28 01:32:28 +0800
committerThomas Huang <thomas.b.huang@gmail.com>2017-06-28 01:32:28 +0800
commit1977417017eec00a546ab816fa635ea575e4835d (patch)
tree77f942810eda1665b4b8974077985f082bfc24c3 /ui/app/components/identicon.js
parent235cb1f2d790a7bda349ab0d33ad1009751a8536 (diff)
parent48f7cff8c0e765e85532c860c5f3061ca1d6deb7 (diff)
downloadtangerine-wallet-browser-1977417017eec00a546ab816fa635ea575e4835d.tar.gz
tangerine-wallet-browser-1977417017eec00a546ab816fa635ea575e4835d.tar.zst
tangerine-wallet-browser-1977417017eec00a546ab816fa635ea575e4835d.zip
Merge branch 'master' into i1473-dappDefaultGasPrice
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)
}
}
+