diff --git a/Cargo.lock b/Cargo.lock index b2f1335f..9c6cb141 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -750,7 +750,6 @@ checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" name = "celestia-grpc" version = "0.1.0" dependencies = [ - "anyhow", "bytes", "celestia-grpc-macros", "celestia-proto", diff --git a/grpc/Cargo.toml b/grpc/Cargo.toml index 65809faa..02172ad8 100644 --- a/grpc/Cargo.toml +++ b/grpc/Cargo.toml @@ -43,9 +43,6 @@ tonic = { version = "0.12.3", default-features = false, features = [ "transport" getrandom = { version = "0.2.15", features = ["js"] } tonic-web-wasm-client = "0.6" -[dev-dependencies] -anyhow = "1.0.86" - [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] dotenvy = "0.15.7" tokio = { version = "1.38.0", features = ["rt", "macros"] } diff --git a/grpc/tests/tonic.rs b/grpc/tests/tonic.rs index cc1226d6..61f76a37 100644 --- a/grpc/tests/tonic.rs +++ b/grpc/tests/tonic.rs @@ -21,14 +21,14 @@ wasm_bindgen_test::wasm_bindgen_test_configure!(run_in_browser); #[async_test] async fn get_min_gas_price() { - let mut client = new_test_client().unwrap(); + let mut client = new_test_client(); let gas_price = client.get_min_gas_price().await.unwrap(); assert!(gas_price > 0.0); } #[async_test] async fn get_blob_params() { - let mut client = new_test_client().unwrap(); + let mut client = new_test_client(); let params = client.get_blob_params().await.unwrap(); assert!(params.gas_per_blob_byte > 0); assert!(params.gov_max_square_size > 0); @@ -36,7 +36,7 @@ async fn get_blob_params() { #[async_test] async fn get_auth_params() { - let mut client = new_test_client().unwrap(); + let mut client = new_test_client(); let params = client.get_auth_params().await.unwrap(); assert!(params.max_memo_characters > 0); assert!(params.tx_sig_limit > 0); @@ -47,7 +47,7 @@ async fn get_auth_params() { #[async_test] async fn get_block() { - let mut client = new_test_client().unwrap(); + let mut client = new_test_client(); let latest_block = client.get_latest_block().await.unwrap(); let height = latest_block.header.height.value() as i64; @@ -58,7 +58,7 @@ async fn get_block() { #[async_test] async fn get_account() { - let mut client = new_test_client().unwrap(); + let mut client = new_test_client(); let accounts = client.get_accounts().await.unwrap(); @@ -76,7 +76,7 @@ async fn get_account() { #[async_test] async fn submit_blob() { - let mut client = new_test_client().unwrap(); + let mut client = new_test_client(); let account_credentials = load_account(); let namespace = Namespace::new_v0(&[1, 2, 3]).unwrap(); diff --git a/grpc/tests/utils/mod.rs b/grpc/tests/utils/mod.rs index 32a45b4b..9aca9770 100644 --- a/grpc/tests/utils/mod.rs +++ b/grpc/tests/utils/mod.rs @@ -1,6 +1,5 @@ use std::time::Duration; -use anyhow::Result; use celestia_grpc::GrpcClient; use celestia_types::state::Address; use tendermint::crypto::default::ecdsa_secp256k1::SigningKey; @@ -24,16 +23,16 @@ pub struct TestAccount { } #[cfg(not(target_arch = "wasm32"))] -pub fn new_test_client() -> Result> { +pub fn new_test_client() -> GrpcClient { let _ = dotenvy::dotenv(); let url = std::env::var("CELESTIA_GRPC_URL").unwrap_or_else(|_| CELESTIA_GRPC_URL.into()); - Ok(GrpcClient::with_url(url)?) + GrpcClient::with_url(url).expect("creating client failed") } #[cfg(target_arch = "wasm32")] -pub fn new_test_client() -> Result> { - Ok(GrpcClient::with_grpcweb_url(CELESTIA_GRPCWEB_PROXY_URL)) +pub fn new_test_client() -> GrpcClient { + GrpcClient::with_grpcweb_url(CELESTIA_GRPCWEB_PROXY_URL) } pub fn load_account() -> TestAccount {