From c824418955bcda67181660873c6101e6a020cc35 Mon Sep 17 00:00:00 2001 From: bunoi Date: Mon, 3 Sep 2018 18:32:38 +0700 Subject: edit decimal check in old-ui/ --- old-ui/app/add-suggested-token.js | 2 +- old-ui/app/add-token.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/old-ui/app/add-suggested-token.js b/old-ui/app/add-suggested-token.js index 51be4c5f2..ea534b7da 100644 --- a/old-ui/app/add-suggested-token.js +++ b/old-ui/app/add-suggested-token.js @@ -172,7 +172,7 @@ AddSuggestedTokenScreen.prototype.validateInputs = function (opts) { msg += 'Address is invalid.' } - const validDecimals = decimals >= 0 && decimals < 36 + const validDecimals = decimals >= 0 && decimals <= 36 if (!validDecimals) { msg += 'Decimals must be at least 0, and not over 36. ' } diff --git a/old-ui/app/add-token.js b/old-ui/app/add-token.js index e869ac39a..6cf211636 100644 --- a/old-ui/app/add-token.js +++ b/old-ui/app/add-token.js @@ -196,7 +196,7 @@ AddTokenScreen.prototype.validateInputs = function () { msg += 'Address is invalid.' } - const validDecimals = decimals >= 0 && decimals < 36 + const validDecimals = decimals >= 0 && decimals <= 36 if (!validDecimals) { msg += 'Decimals must be at least 0, and not over 36. ' } -- cgit v1.2.3 From f412b192440fe1db9132c703a138082f489ca548 Mon Sep 17 00:00:00 2001 From: bunoi Date: Tue, 4 Sep 2018 23:40:02 +0700 Subject: fix check valid decimals code in new ui --- ui/app/components/pages/add-token/add-token.component.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/app/components/pages/add-token/add-token.component.js b/ui/app/components/pages/add-token/add-token.component.js index 59748ff46..3612e676c 100644 --- a/ui/app/components/pages/add-token/add-token.component.js +++ b/ui/app/components/pages/add-token/add-token.component.js @@ -206,7 +206,7 @@ class AddToken extends Component { const validDecimals = customDecimals !== null && customDecimals !== '' && customDecimals >= 0 && - customDecimals < 36 + customDecimals <= 36 let customDecimalsError = null if (!validDecimals) { -- cgit v1.2.3