Skip to content

Commit

Permalink
fix: clippy and format
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasArrachea committed Feb 20, 2025
1 parent ace7b1a commit dad20af
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
10 changes: 5 additions & 5 deletions bin/faucet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ tower = "0.5"
tower-http = { version = "0.6", features = ["cors", "set-header", "trace"] }
tracing = { workspace = true }
url = { workspace = true }
tonic-web = { version = "0.12" }
tokio-stream = { workspace = true, features = ["net"] }

[build-dependencies]
# Required to inject build metadata.
miden-node-utils = { workspace = true, features = ["vergen"] }
static-files = "0.2"

[dev-dependencies]
fantoccini = { version = "0.21" }
reqwest = { version = "0.12" }
serde_json = { version = "1.0" }
fantoccini = { version = "0.21" }
reqwest = { version = "0.12" }
serde_json = { version = "1.0" }
tokio-stream = { workspace = true, features = ["net"] }
tonic-web = { version = "0.12" }
3 changes: 2 additions & 1 deletion bin/faucet/src/client.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::{sync::Arc, time::Duration};

use crate::{config::FaucetConfig, errors::ClientError, store::FaucetDataStore, COMPONENT};
use anyhow::Context;
use miden_lib::{note::create_p2id_note, transaction::TransactionKernel};
use miden_node_proto::generated::{
Expand Down Expand Up @@ -31,6 +30,8 @@ use rand::{random, rngs::StdRng};
use tonic::transport::Channel;
use tracing::info;

use crate::{config::FaucetConfig, errors::ClientError, store::FaucetDataStore, COMPONENT};

pub const DISTRIBUTE_FUNGIBLE_ASSET_SCRIPT: &str =
include_str!("transaction_scripts/distribute_fungible_asset.masm");

Expand Down
5 changes: 3 additions & 2 deletions bin/faucet/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,13 @@ async fn serve_faucet(config: FaucetConfig) -> anyhow::Result<()> {
mod test {
use std::{process::Command, str::FromStr, time::Duration};

use crate::{config::FaucetConfig, serve_faucet, stub_rpc_api::serve_stub};
use fantoccini::ClientBuilder;
use serde_json::{json, Map};
use tokio::time::sleep;
use url::Url;

use crate::{config::FaucetConfig, serve_faucet, stub_rpc_api::serve_stub};

#[tokio::test]
async fn test_website() {
let stub_node_url = Url::from_str("http://localhost:50051").unwrap();
Expand Down Expand Up @@ -312,7 +313,7 @@ mod test {
return requests;
";
let requests = client.execute(script, vec![]).await.unwrap();
assert!(requests.as_array().unwrap().len() > 0);
assert!(!requests.as_array().unwrap().is_empty());

for request in requests.as_array().unwrap() {
let uri = request.as_str().unwrap();
Expand Down

0 comments on commit dad20af

Please sign in to comment.