From 591673821cd514d5873e0e4b895e9fb73768dfd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Wed, 8 Feb 2017 14:45:06 +0100 Subject: [PATCH] Work with string numbers in contract (Fixes #4472) (#4478) (#4480) --- js/src/ui/Form/TypedInput/typedInput.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/src/ui/Form/TypedInput/typedInput.js b/js/src/ui/Form/TypedInput/typedInput.js index dcdd599bb..e7e5c0648 100644 --- a/js/src/ui/Form/TypedInput/typedInput.js +++ b/js/src/ui/Form/TypedInput/typedInput.js @@ -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) {