aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components')
-rw-r--r--ui/app/components/account-panel.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/ui/app/components/account-panel.js b/ui/app/components/account-panel.js
index 9fda2ebfc..25b5e5d24 100644
--- a/ui/app/components/account-panel.js
+++ b/ui/app/components/account-panel.js
@@ -4,6 +4,7 @@ const Component = require('react').Component
const h = require('react-hyperscript')
const addressSummary = require('../util').addressSummary
const formatBalance = require('../util').formatBalance
+const Identicon = require('identicon.js')
module.exports = AccountPanel
@@ -19,6 +20,9 @@ AccountPanel.prototype.render = function() {
var account = state.account || {}
var isFauceting = state.isFauceting
+ var identicon = new Identicon(identity.address, 46).toString()
+ var identiconSrc = `data:image/png;base64,${identicon}`
+
return (
h('.identity-panel.flex-row.flex-space-between'+(state.isSelected?'.selected':''), {
@@ -30,8 +34,12 @@ AccountPanel.prototype.render = function() {
// account identicon
h('.identicon-wrapper.flex-column.select-none', [
- h('.identicon', {
- style: { backgroundImage: 'url("https://ipfs.io/ipfs/'+identity.img+'")' }
+ h('img.identicon', {
+ src: identiconSrc,
+ style: {
+ border: 'none',
+ borderRadius: '20px',
+ }
}),
h('span.font-small', identity.name),
]),