Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: stellar contract info * commands require network when network no… #1676

Merged
merged 12 commits into from
Nov 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions cmd/soroban-cli/src/commands/network/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,17 @@ impl Cmd {
cmd.run(global_args).await?;
}
};

// Additional logic for checking network requirement
// If WASM file is provided, don't require network arguments
if global_args.wasm.is_some() {
return Ok(());
}

// If no wasm is provided, network arguments are required
if global_args.rpc_url.is_none() || global_args.network_passphrase.is_none() || global_args.network.is_none() {
return Err(Error::Network);
}
Dhanraj30 marked this conversation as resolved.
Show resolved Hide resolved
Ok(())
}
}
Loading