Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
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
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/src/bin/namada-client/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ async fn main() -> Result<()> {
CliApi::<CliIo>::handle_client_command::<HttpClient>(
None,
cli::namada_client_cli()?,
&CliIo,
)
.await
}
3 changes: 2 additions & 1 deletion apps/src/bin/namada-relayer/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ async fn main() -> Result<()> {

let cmd = cli::namada_relayer_cli()?;
// run the CLI
CliApi::<CliIo>::handle_relayer_command::<HttpClient>(None, cmd).await
CliApi::<CliIo>::handle_relayer_command::<HttpClient>(None, cmd, &CliIo)
Comment thread
murisi marked this conversation as resolved.
Outdated
.await
}
2 changes: 1 addition & 1 deletion apps/src/bin/namada-wallet/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ pub fn main() -> Result<()> {
color_eyre::install()?;
let (cmd, ctx) = cli::namada_wallet_cli()?;
// run the CLI
CliApi::<CliIo>::handle_wallet_command(cmd, ctx)
CliApi::<CliIo>::handle_wallet_command(cmd, ctx, &CliIo)
}
9 changes: 5 additions & 4 deletions apps/src/lib/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub mod wallet;

use clap::{ArgGroup, ArgMatches, ColorChoice};
use color_eyre::eyre::Result;
use namada::types::io::DefaultIo;
use namada::types::io::StdIo;
use utils::*;
pub use utils::{safe_exit, Cmd};

Expand Down Expand Up @@ -2534,6 +2534,7 @@ pub mod args {
use super::context::*;
use super::utils::*;
use super::{ArgGroup, ArgMatches};
use crate::cli::context::FromContext;
use crate::config::{self, Action, ActionAtHeight};
use crate::facade::tendermint::Timeout;
use crate::facade::tendermint_config::net::Address as TendermintAddress;
Expand Down Expand Up @@ -3525,8 +3526,8 @@ pub mod args {
target,
token,
amount,
native_token: (),
tx_code_path,
native_token: (),
}
}

Expand Down Expand Up @@ -3881,8 +3882,8 @@ pub mod args {
validator,
amount,
source,
native_token: (),
tx_code_path,
native_token: (),
}
}

Expand Down Expand Up @@ -5799,7 +5800,7 @@ pub fn namada_relayer_cli() -> Result<NamadaRelayer> {
cmds::EthBridgePool::WithContext(sub_cmd),
) => {
let global_args = args::Global::parse(&matches);
let context = Context::new::<DefaultIo>(global_args)?;
let context = Context::new::<StdIo>(global_args)?;
Ok(NamadaRelayer::EthBridgePoolWithCtx(Box::new((
sub_cmd, context,
))))
Expand Down
6 changes: 3 additions & 3 deletions apps/src/lib/cli/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use crate::client::utils;
#[async_trait::async_trait(?Send)]
pub trait CliClient: Client + Sync {
fn from_tendermint_address(address: &mut TendermintAddress) -> Self;
async fn wait_until_node_is_synced<IO: Io>(&self) -> Halt<()>;
async fn wait_until_node_is_synced(&self, io: &impl Io) -> Halt<()>;
}

#[async_trait::async_trait(?Send)]
Expand All @@ -22,8 +22,8 @@ impl CliClient for HttpClient {
HttpClient::new(utils::take_config_address(address)).unwrap()
}

async fn wait_until_node_is_synced<IO: Io>(&self) -> Halt<()> {
wait_until_node_is_synched::<_, IO>(self).await
async fn wait_until_node_is_synced(&self, io: &impl Io) -> Halt<()> {
wait_until_node_is_synched(self, io).await
}
}

Expand Down
Loading