Use is_amount clap validator (#7400)

* Fix up is_amount to handle floats for SOL; expand amount_of test

* Use required_lamports_from and is_amount across CLI

* Remove obsolete test (now handled by clap)
This commit is contained in:
Tyera Eulberg
2019-12-10 11:29:17 -07:00
committed by GitHub
parent 6f457292ff
commit 11521dca08
6 changed files with 49 additions and 23 deletions

View File

@@ -127,6 +127,7 @@ impl ClusterQuerySubCommands for App<'_, '_> {
.value_name("NUMBER")
.takes_value(true)
.default_value("1")
.validator(is_amount)
.help("Number of lamports to transfer for each transaction"),
)
.arg(