#2166: Zero should be treated as valid amount for send command
This commit is contained in:
parent
e5c7d81b65
commit
7c000fc725
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue