mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-08-16 09:10:32 +03:00
Fix API endpoint
This commit is contained in:
parent
c42485d89f
commit
f5f186790b
@ -132,7 +132,11 @@ pub trait Command {
|
||||
/// require Build command output as their input.
|
||||
#[derive(Parser, Clone, Debug)]
|
||||
pub struct BuildOptions {
|
||||
#[clap(long, help = "Endpoint to retrieve network state from.", default_value = "http://api.explorer.aleo.org/v1")]
|
||||
#[clap(
|
||||
long,
|
||||
help = "Endpoint to retrieve network state from.",
|
||||
default_value = "https://api.explorer.aleo.org/v1"
|
||||
)]
|
||||
pub endpoint: String,
|
||||
#[clap(long, help = "Network to broadcast to. Defaults to mainnet.", default_value = "mainnet")]
|
||||
pub(crate) network: String,
|
||||
|
@ -49,8 +49,8 @@ pub struct Query {
|
||||
short,
|
||||
long,
|
||||
global = true,
|
||||
help = "Endpoint to retrieve network state from. Defaults to http://api.explorer.aleo.org/v1.",
|
||||
default_value = "http://api.explorer.aleo.org/v1"
|
||||
help = "Endpoint to retrieve network state from. Defaults to https://api.explorer.aleo.org/v1.",
|
||||
default_value = "https://api.explorer.aleo.org/v1"
|
||||
)]
|
||||
pub endpoint: String,
|
||||
#[clap(short, long, global = true, help = "Network to use. Defaults to mainnet.", default_value = "mainnet")]
|
||||
@ -79,7 +79,7 @@ impl Command for Query {
|
||||
QueryCommands::Stateroot { command } => command.apply(context, ())?,
|
||||
QueryCommands::Committee { command } => command.apply(context, ())?,
|
||||
QueryCommands::Mempool { command } => {
|
||||
if self.endpoint == "http://api.explorer.aleo.org/v1" {
|
||||
if self.endpoint == "https://api.explorer.aleo.org/v1" {
|
||||
tracing::warn!(
|
||||
"⚠️ `leo query mempool` is only valid when using a custom endpoint. Specify one using `--endpoint`."
|
||||
);
|
||||
@ -87,7 +87,7 @@ impl Command for Query {
|
||||
command.apply(context, ())?
|
||||
}
|
||||
QueryCommands::Peers { command } => {
|
||||
if self.endpoint == "http://api.explorer.aleo.org/v1" {
|
||||
if self.endpoint == "https://api.explorer.aleo.org/v1" {
|
||||
tracing::warn!(
|
||||
"⚠️ `leo query peers` is only valid when using a custom endpoint. Specify one using `--endpoint`."
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user