aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/identicon.js
diff options
context:
space:
mode:
authorChi Kei Chan <chikeichan@gmail.com>2017-09-07 14:03:23 +0800
committerChi Kei Chan <chikeichan@gmail.com>2017-09-07 14:03:23 +0800
commit14b2f3e391752cca02c05ae0137e490bfdcdd7a7 (patch)
treed23f6397e4b21bcb3f3c009d722fa666fab79b10 /ui/app/components/identicon.js
parentf1fb9e10a06d1811d97f61b6369684979b7ecf70 (diff)
downloadtangerine-wallet-browser-14b2f3e391752cca02c05ae0137e490bfdcdd7a7.tar
tangerine-wallet-browser-14b2f3e391752cca02c05ae0137e490bfdcdd7a7.tar.gz
tangerine-wallet-browser-14b2f3e391752cca02c05ae0137e490bfdcdd7a7.tar.bz2
tangerine-wallet-browser-14b2f3e391752cca02c05ae0137e490bfdcdd7a7.tar.lz
tangerine-wallet-browser-14b2f3e391752cca02c05ae0137e490bfdcdd7a7.tar.xz
tangerine-wallet-browser-14b2f3e391752cca02c05ae0137e490bfdcdd7a7.tar.zst
tangerine-wallet-browser-14b2f3e391752cca02c05ae0137e490bfdcdd7a7.zip
Show token balance and identicon
Diffstat (limited to 'ui/app/components/identicon.js')
-rw-r--r--ui/app/components/identicon.js44
1 files changed, 28 insertions, 16 deletions
diff --git a/ui/app/components/identicon.js b/ui/app/components/identicon.js
index 71831fe71..259fa4d73 100644
--- a/ui/app/components/identicon.js
+++ b/ui/app/components/identicon.js
@@ -18,23 +18,35 @@ function IdenticonComponent () {
IdenticonComponent.prototype.render = function () {
var props = this.props
- const { className = '' } = props
+ const { className = '', address } = props
var diameter = props.diameter || this.defaultDiameter
- return (
- h('div', {
- className: `${className} identicon`,
- key: 'identicon-' + this.props.address,
- style: {
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
- height: diameter,
- width: diameter,
- borderRadius: diameter / 2,
- overflow: 'hidden',
- },
- })
- )
+
+ return address
+ ? (
+ h('div', {
+ className: `${className} identicon`,
+ key: 'identicon-' + address,
+ style: {
+ display: 'flex',
+ alignItems: 'center',
+ justifyContent: 'center',
+ height: diameter,
+ width: diameter,
+ borderRadius: diameter / 2,
+ overflow: 'hidden',
+ },
+ })
+ )
+ : (
+ h('img.balance-icon', {
+ src: '../images/eth_logo.svg',
+ style: {
+ height: diameter,
+ width: diameter,
+ borderRadius: diameter / 2,
+ },
+ })
+ )
}
IdenticonComponent.prototype.componentDidMount = function () {