Work with string numbers in contract (Fixes #4472) (#4478) (#4480)

This commit is contained in:
Tomasz Drwięga 2017-02-08 14:45:06 +01:00 committed by Jaco Greeff
parent ce5dfd8e34
commit 591673821c
1 changed files with 3 additions and 3 deletions

View File

@ -215,8 +215,8 @@ export default class TypedInput extends Component {
renderEth () {
const { ethValue, isEth } = this.state;
const value = ethValue && typeof ethValue.toNumber === 'function'
? ethValue.toNumber()
const value = ethValue && typeof ethValue.toFixed === 'function'
? ethValue.toFixed() // we need a string representation, could be >15 digits
: ethValue;
const input = isEth
@ -255,7 +255,7 @@ export default class TypedInput extends Component {
return readOnly
? bnValue.toFormat()
: bnValue.toNumber();
: bnValue.toFixed(); // we need a string representation, could be >15 digits
}
renderInteger (value = this.props.value, onChange = this.onChange) {