import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import classnames from 'classnames'
import { toDataUrl } from '../../../lib/blockies'
import contractMap from 'eth-contract-metadata'
import { checksumAddress } from '../../../app/util'
import Jazzicon from '../jazzicon'
const getStyles = diameter => (
{
height: diameter,
width: diameter,
borderRadius: diameter / 2,
}
)
export default class Identicon extends PureComponent {
static propTypes = {
address: PropTypes.string,
className: PropTypes.string,
diameter: PropTypes.number,
image: PropTypes.string,
useBlockie: PropTypes.bool,
}
static defaultProps = {
diameter: 46,
}
renderImage () {
const { className, diameter, image } = this.props
return (
)
}
renderJazzicon () {
const { address, className, diameter } = this.props
return (