Skip to content

Commit

Permalink
change to be back compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
zancas committed Jan 15, 2025
1 parent 4f2f14d commit 402d59a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions zingolib/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ impl Command for AddressCommand {
indoc! {r#"
List current addresses in the wallet, shielded exludes t-addresses.
Usage:
addresses true|false
addresses shielded
"#}
}
Expand All @@ -734,14 +734,11 @@ impl Command for AddressCommand {

fn exec(&self, args: &[&str], lightclient: &LightClient) -> String {
match args.len() {
0 => self.help().to_string(),
0 => RT.block_on(async move { lightclient.do_addresses(false).await.pretty(2) }),
1 => match args[0] {
"true" => {
"shielded" => {
RT.block_on(async move { lightclient.do_addresses(true).await.pretty(2) })
}
"false" => {
RT.block_on(async move { lightclient.do_addresses(false).await.pretty(2) })
}
_ => self.help().to_string(),
},
_ => self.help().to_string(),
Expand Down

0 comments on commit 402d59a

Please sign in to comment.