From 29968b2ff3fa93c7cde46d0ac0664843b1691317 Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Tue, 20 Sep 2016 17:15:29 +0300 Subject: [PATCH] validate empty input in send command --- resources/commands.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/resources/commands.js b/resources/commands.js index 4a8b7eb216..21038b2c9f 100644 --- a/resources/commands.js +++ b/resources/commands.js @@ -262,6 +262,17 @@ status.command({ }); function validateBalance(params) { + if(!params.value){ + return { + errors: [ + status.components.validationMessage( + "Amount", + "Amount must be specified" + ) + ] + }; + } + try { var val = web3.toWei(params.value, "ether"); } catch (err) {