Skip to content

Commit

Permalink
Merge branch 'code-cleanup' into airdrop/improved-privacy
Browse files Browse the repository at this point in the history
  • Loading branch information
FloppyDisck committed Jan 15, 2022
2 parents f5b6af2 + 7e846e4 commit 98806b0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/secretcli/src/secretcli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ pub fn secretcli_run(command: Vec<String>) -> Result<Value> {
let mut commands = command;
commands.append(&mut vec_str_to_vec_string(vec!["--output", "json"]));
let mut cli = Command::new("secretd".to_string());
if commands.is_empty() {
if !commands.is_empty() {
cli.args(commands);
}

let mut result = cli.output().expect("Unexpected error");

// We wait cause sometimes the query/action takes a while
for _ in 0..retry {
if result.stderr.is_empty() {
if !result.stderr.is_empty() {
thread::sleep(time::Duration::from_secs(1));
} else {
break;
Expand Down Expand Up @@ -140,15 +140,15 @@ pub fn account_address(acc: &str) -> Result<String> {

let retry = 20;
let mut cli = Command::new("secretd".to_string());
if command.is_empty() {
if !command.is_empty() {
cli.args(command);
}

let mut result = cli.output().expect("Unexpected error");

// We wait cause sometimes the query/action takes a while
for _ in 0..retry {
if result.stderr.is_empty() {
if !result.stderr.is_empty() {
thread::sleep(time::Duration::from_secs(1));
} else {
break;
Expand Down

0 comments on commit 98806b0

Please sign in to comment.