From 31d17c9e25458cd47f8c18ec3b967aecff236ba6 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 23 May 2017 14:26:37 -0700 Subject: Fix test, create new value for precision/scale --- ui/app/components/bn-as-decimal-input.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ui/app/components/bn-as-decimal-input.js') diff --git a/ui/app/components/bn-as-decimal-input.js b/ui/app/components/bn-as-decimal-input.js index fbe36abfb..8f56f29ab 100644 --- a/ui/app/components/bn-as-decimal-input.js +++ b/ui/app/components/bn-as-decimal-input.js @@ -26,12 +26,12 @@ BnAsDecimalInput.prototype.render = function () { const props = this.props const state = this.state - const { value, precision, onChange, min, max } = props + const { value, scale, precision, onChange, min, max } = props const suffix = props.suffix const style = props.style const valueString = value.toString(10) - const newValue = downsize(valueString, precision, precision) + const newValue = downsize(valueString, scale, precision) return ( h('.flex-column', [ @@ -65,7 +65,7 @@ BnAsDecimalInput.prototype.render = function () { const value = (event.target.value === '') ? '' : event.target.value - const scaledNumber = upsize(value, precision, precision) + const scaledNumber = upsize(value, scale, precision) const precisionBN = new BN(scaledNumber, 10) onChange(precisionBN) }, -- cgit