validate empty input in send command

This commit is contained in:
Roman Volosovskyi 2016-09-20 17:15:29 +03:00
parent 6d333bfed7
commit 29968b2ff3
1 changed files with 11 additions and 0 deletions

View File

@ -262,6 +262,17 @@ status.command({
}); });
function validateBalance(params) { function validateBalance(params) {
if(!params.value){
return {
errors: [
status.components.validationMessage(
"Amount",
"Amount must be specified"
)
]
};
}
try { try {
var val = web3.toWei(params.value, "ether"); var val = web3.toWei(params.value, "ether");
} catch (err) { } catch (err) {