diff --git a/src/components/swaptab/index.js b/src/components/swaptab/index.js index 29a8b3f..ba1f7b5 100644 --- a/src/components/swaptab/index.js +++ b/src/components/swaptab/index.js @@ -245,13 +245,14 @@ class SwapTab extends React.Component { const newBase = new BigNumber(quoteAmount).dividedBy(rate).toFixed(8); const fee = this.calculateFee(newBase, this.baseAsset.isLightning); - const newBaseWithFee = Number((newBase + fee).toFixed(8)); + + const newBaseWithFee = (Number(newBase) + fee).toFixed(8); const inputError = !this.checkBaseAmount(newBaseWithFee); this.setState({ quoteAmount: Number(quoteAmount), - baseAmount: newBaseWithFee, + baseAmount: Number(newBaseWithFee), feeAmount: fee, inputError, });