aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2016-05-11 14:53:07 +0800
committerkumavis <aaron@kumavis.me>2016-05-11 14:53:07 +0800
commitc8640537e651621a00e66fd020e5e6c55b8b31ff (patch)
treef1b0e7e6a5b932a259dcae0ccdad0416413f132d
parentd9d442ed1f4dd1579deed95bedd1b077e828c972 (diff)
downloadtangerine-wallet-browser-c8640537e651621a00e66fd020e5e6c55b8b31ff.tar
tangerine-wallet-browser-c8640537e651621a00e66fd020e5e6c55b8b31ff.tar.gz
tangerine-wallet-browser-c8640537e651621a00e66fd020e5e6c55b8b31ff.tar.bz2
tangerine-wallet-browser-c8640537e651621a00e66fd020e5e6c55b8b31ff.tar.lz
tangerine-wallet-browser-c8640537e651621a00e66fd020e5e6c55b8b31ff.tar.xz
tangerine-wallet-browser-c8640537e651621a00e66fd020e5e6c55b8b31ff.tar.zst
tangerine-wallet-browser-c8640537e651621a00e66fd020e5e6c55b8b31ff.zip
hotfix - identicon jazz bug
-rw-r--r--svg-notifications.md3
-rw-r--r--ui/app/components/identicon.js8
2 files changed, 9 insertions, 2 deletions
diff --git a/svg-notifications.md b/svg-notifications.md
index bbb74da79..fd3b63f7a 100644
--- a/svg-notifications.md
+++ b/svg-notifications.md
@@ -12,6 +12,9 @@ Heres some utilities for preparing the data uri:
build a template using pure svg:
+generate uri
+'data:image/svg+xml;charset=utf-8,'+encodeURIComponent(svgSrc)
+
<svg xmlns='http://www.w3.org/2000/svg'
width='1000px' height='500px' viewBox='0 0 200 100'>
<rect x='0' y='0' width='100%' height='100%' fill='white' />
diff --git a/ui/app/components/identicon.js b/ui/app/components/identicon.js
index 8294ce4d5..3fbf3c699 100644
--- a/ui/app/components/identicon.js
+++ b/ui/app/components/identicon.js
@@ -14,7 +14,6 @@ function IdenticonComponent() {
}
IdenticonComponent.prototype.render = function() {
- debugger
return (
h('div', {
key: 'identicon-' + this.props.address,
@@ -38,8 +37,13 @@ IdenticonComponent.prototype.componentDidMount = function(){
var numericRepresentation = jsNumberForAddress(address)
var container = findDOMNode(this)
+ // jazzicon with hack to fix inline svg error
var identicon = jazzicon(this.diameter, numericRepresentation)
- container.appendChild(identicon)
+ var identiconSrc = identicon.innerHTML
+ var dataUri = 'data:image/svg+xml;charset=utf-8,'+encodeURIComponent(identiconSrc)
+ var img = document.createElement('img')
+ img.src = dataUri
+ container.appendChild(img)
}
function jsNumberForAddress(address) {