From 29674a0e65a6ee28774b5f0adc6b29d48b01dc1d Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Mon, 12 Dec 2016 12:48:32 +0100 Subject: [PATCH] Small testability fixes --- js/src/ui/IdentityIcon/identityIcon.js | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/js/src/ui/IdentityIcon/identityIcon.js b/js/src/ui/IdentityIcon/identityIcon.js index 466ffa9b5..55fc34afa 100644 --- a/js/src/ui/IdentityIcon/identityIcon.js +++ b/js/src/ui/IdentityIcon/identityIcon.js @@ -19,6 +19,8 @@ import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import ContractIcon from 'material-ui/svg-icons/action/code'; +import { createIdentityImg } from '~/api/util/identity'; + import styles from './identityIcon.css'; class IdentityIcon extends Component { @@ -29,12 +31,12 @@ class IdentityIcon extends Component { static propTypes = { address: PropTypes.string, button: PropTypes.bool, - className: PropTypes.string, center: PropTypes.bool, - padded: PropTypes.bool, + className: PropTypes.string, inline: PropTypes.bool, - tiny: PropTypes.bool, - images: PropTypes.object.isRequired + images: PropTypes.object.isRequired, + padded: PropTypes.bool, + tiny: PropTypes.bool } state = { @@ -75,7 +77,7 @@ class IdentityIcon extends Component { } this.setState({ - iconsrc: api.util.createIdentityImg(_address, scale) + iconsrc: createIdentityImg(_address, scale) }); } @@ -105,16 +107,20 @@ class IdentityIcon extends Component { return ( + style={ { + width: size, + height: size, + background: '#eee' + } } /> ); } return ( + src={ iconsrc } /> ); } }