Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Work with string numbers in contract (Fixes #4472) (#4478) (#4480)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomusdrw authored and jacogr committed Feb 8, 2017
1 parent ce5dfd8 commit 5916738
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/src/ui/Form/TypedInput/typedInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 5916738

Please sign in to comment.