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