1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 18:41:38 +01:00
metamask-extension/ui/app/components/token-balance/token-balance.component.js
Alexander Tseung 4c87c05a02
Fix rounding issue when sending max tokens (#5695)
* Fix rounding issue when sending max tokens

* Ensure amount row shows exact amount of max tokens on send screen (#2)

* Fix tests

* Change stored redux value from BigNumber to hex string. Fix TokenInput default value
2018-11-19 16:06:34 -08:00

26 lines
580 B
JavaScript

import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import CurrencyDisplay from '../currency-display'
export default class TokenBalance extends PureComponent {
static propTypes = {
string: PropTypes.string,
symbol: PropTypes.string,
error: PropTypes.string,
className: PropTypes.string,
withSymbol: PropTypes.bool,
}
render () {
const { className, string, symbol } = this.props
return (
<CurrencyDisplay
className={className}
displayValue={string}
suffix={symbol}
/>
)
}
}