diff options
author | Esteban MIno <efmino@uc.cl> | 2018-08-16 23:04:43 +0800 |
---|---|---|
committer | Esteban MIno <efmino@uc.cl> | 2018-08-16 23:04:43 +0800 |
commit | a36ea0e2328e6ffedd5b526470dc1133c4f2f556 (patch) | |
tree | f9ce81f5cf4c5893f43e99850f725a1fdf2435de /ui/app/components/identicon.js | |
parent | 5289a36664f180fae1dc6da07ccc80d307f7408c (diff) | |
download | tangerine-wallet-browser-a36ea0e2328e6ffedd5b526470dc1133c4f2f556.tar.gz tangerine-wallet-browser-a36ea0e2328e6ffedd5b526470dc1133c4f2f556.tar.zst tangerine-wallet-browser-a36ea0e2328e6ffedd5b526470dc1133c4f2f556.zip |
show watch asset image from hide token modal
Diffstat (limited to 'ui/app/components/identicon.js')
-rw-r--r-- | ui/app/components/identicon.js | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/ui/app/components/identicon.js b/ui/app/components/identicon.js index eadd6d5a2..6b632352f 100644 --- a/ui/app/components/identicon.js +++ b/ui/app/components/identicon.js @@ -28,14 +28,17 @@ IdenticonComponent.prototype.render = function () { var props = this.props const { className = '', address, imageUrl } = props var diameter = props.diameter || this.defaultDiameter - // for tokens added with `watchToken` we need to render the given image + const style = { + height: diameter, + width: diameter, + borderRadius: diameter / 2, + } if (imageUrl) { - return h('img.balance-icon', { + return h('img', { + className: `${className} identicon`, src: imageUrl, style: { - height: diameter, - width: diameter, - borderRadius: diameter / 2, + ...style, }, }) } else if (address) { @@ -47,9 +50,7 @@ IdenticonComponent.prototype.render = function () { flexShrink: 0, alignItems: 'center', justifyContent: 'center', - height: diameter, - width: diameter, - borderRadius: diameter / 2, + ...style, overflow: 'hidden', }, }) @@ -57,9 +58,7 @@ IdenticonComponent.prototype.render = function () { return h('img.balance-icon', { src: './images/eth_logo.svg', style: { - height: diameter, - width: diameter, - borderRadius: diameter / 2, + ...style, }, }) } |