Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
repaint() {
if (this.props.account) {
jdenticon.updateById(this.canvas_id); // UPDATE JDENTICOM
} else {
let ctx = ReactDOM.findDOMNode(this.refs.canvas).getContext('2d');
ctx.fillStyle = 'rgba(255, 255, 255, 0.2)';
let size = ctx.canvas.width;
ctx.clearRect(0, 0, size, size);
ctx.fillRect(0, 0, size, size);
ctx.clearRect(0 + 1, 0 + 1, size - 2, size - 2);
ctx.font = `${size}px sans-serif`;
ctx.fillText('?', size / 4, size - size / 6);
}
}
repaint() {
if(this.props.account) jdenticon.updateById(this.canvas_id);
else {
let ctx = this.refs.canvas.getContext('2d');
ctx.fillStyle = "rgba(100, 100, 100, 0.5)";
let size = ctx.canvas.width;
ctx.clearRect(0, 0, size, size);
ctx.fillRect(0, 0, size, size);
ctx.clearRect(0+1, 0+1, size-2, size-2);
ctx.font = `${size}px sans-serif`;
ctx.fillText("?", size/4, size - size/6);
}
}
repaint() {
if (this.props.account) jdenticon.updateById(this.canvas_id);
else {
let ctx = this.refs.canvas.getContext("2d");
ctx.fillStyle = "rgba(100, 100, 100, 0.5)";
let size = ctx.canvas.width;
ctx.clearRect(0, 0, size, size);
ctx.fillRect(0, 0, size, size);
ctx.clearRect(0 + 1, 0 + 1, size - 2, size - 2);
ctx.font = `${size}px sans-serif`;
ctx.fillText("?", size / 4, size - size / 6);
}
}