Merge branch 'beta' into production

This commit is contained in:
Noah Zinsmeister 2019-05-30 18:06:20 -04:00
commit 5c2acb8c4d
No known key found for this signature in database
GPG Key ID: 83022DD49188C9F2

@ -289,7 +289,7 @@ export default function Swap() {
// declare/get parsed and formatted versions of input/output values
const [independentValueParsed, setIndependentValueParsed] = useState()
const dependentValueFormatted = !!(dependentValue && dependentDecimals)
const dependentValueFormatted = !!(dependentValue && (dependentDecimals || dependentDecimals === 0))
? amountFormatter(dependentValue, dependentDecimals, Math.min(4, dependentDecimals), false)
: ''
const inputValueParsed = independentField === INPUT ? independentValueParsed : dependentValue
@ -300,7 +300,7 @@ export default function Swap() {
// validate + parse independent value
const [independentError, setIndependentError] = useState()
useEffect(() => {
if (independentValue && independentDecimals) {
if (independentValue && (independentDecimals || independentDecimals === 0)) {
try {
const parsedValue = ethers.utils.parseUnits(independentValue, independentDecimals)