2018-07-30 21:02:55 +02:00
|
|
|
import React, { PureComponent } from 'react'
|
|
|
|
import PropTypes from 'prop-types'
|
2018-11-20 01:06:34 +01:00
|
|
|
import CurrencyDisplay from '../currency-display'
|
2018-07-30 21:02:55 +02:00
|
|
|
|
|
|
|
export default class TokenBalance extends PureComponent {
|
|
|
|
static propTypes = {
|
|
|
|
string: PropTypes.string,
|
|
|
|
symbol: PropTypes.string,
|
|
|
|
error: PropTypes.string,
|
|
|
|
className: PropTypes.string,
|
|
|
|
withSymbol: PropTypes.bool,
|
|
|
|
}
|
|
|
|
|
|
|
|
render () {
|
2018-11-20 01:06:34 +01:00
|
|
|
const { className, string, symbol } = this.props
|
2018-07-30 21:02:55 +02:00
|
|
|
|
|
|
|
return (
|
2018-11-20 01:06:34 +01:00
|
|
|
<CurrencyDisplay
|
|
|
|
className={className}
|
|
|
|
displayValue={string}
|
|
|
|
suffix={symbol}
|
|
|
|
/>
|
2018-07-30 21:02:55 +02:00
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|