#2166: Zero should be treated as valid amount for send command

This commit is contained in:
alwx 2017-10-16 15:42:11 +02:00 committed by Roman Volosovskyi
parent e5c7d81b65
commit 7c000fc725
2 changed files with 4 additions and 4 deletions

View File

@ -343,7 +343,7 @@ function validateSend(params, context) {
try {
var val = web3.toWei(amount, "ether");
if (val <= 0) {
if (val < 0) {
throw new Error();
}
} catch (err) {
@ -673,7 +673,7 @@ status.command({
try {
var val = web3.toWei(amount, "ether");
if (val <= 0) {
if (val < 0) {
throw new Error();
}
} catch (err) {

View File

@ -285,7 +285,7 @@ function validateSend(params, context) {
try {
var val = web3.toWei(amount, "ether");
if (val <= 0) {
if (val < 0) {
throw new Error();
}
} catch (err) {
@ -523,7 +523,7 @@ status.command({
try {
var val = web3.toWei(amount, "ether");
if (val <= 0) {
if (val < 0) {
throw new Error();
}
} catch (err) {