diff --git a/frontend/src/components/MakerPage.js b/frontend/src/components/MakerPage.js index a2bda5d5..ef01c144 100644 --- a/frontend/src/components/MakerPage.js +++ b/frontend/src/components/MakerPage.js @@ -199,6 +199,7 @@ class MakerPage extends Component { const { t } = this.props; var max = 999; var min = -100; + var premium = e.target.value if(e.target.value > 999){ var bad_premium = t("Must be less than {{max}}%", {max:max}) } @@ -206,8 +207,13 @@ class MakerPage extends Component { var bad_premium = t("Must be more than {{min}}%", {min:min}) } + if (premium == ""){ + premium = 0 + } else { + premium = Number(Math.round(premium +"e"+ 2) + "e-" + 2) + } this.setState({ - premium: e.target.value, + premium: premium, badPremium: bad_premium, }); }