mirror of
https://github.com/Qortal/piratewallet-light-cli.git
synced 2025-02-11 17:55:47 +00:00
Optional memo
This commit is contained in:
parent
9c8389f8f0
commit
8cfa4401c0
@ -92,7 +92,7 @@ impl Command for SendCommand {
|
||||
fn exec(&self, args: &[&str], lightclient: &mut LightClient) {
|
||||
// Parse the args.
|
||||
// 1 - Destination address. T or Z address
|
||||
if args.len() != 3 {
|
||||
if args.len() < 2 || args.len() > 3 {
|
||||
self.help();
|
||||
return;
|
||||
}
|
||||
@ -105,8 +105,10 @@ impl Command for SendCommand {
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
let memo = if args.len() == 3 { Some(args[2].to_string()) } else {None};
|
||||
|
||||
lightclient.do_send(args[0], value, Some(args[2].to_string()));
|
||||
lightclient.do_send(args[0], value, memo);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user