Skip to content

Commit

Permalink
Fixed formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
raduciobanu22 committed Jan 31, 2025
1 parent 27773ee commit e286397
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ pub enum Network {
impl Network {
pub fn base_url(&self) -> String {
match self {
Network::Development => env::var("DEV_NODE_URL")
.unwrap_or_else(|_| "http://127.0.0.1:12973".to_owned()),
Network::Development => {
env::var("DEV_NODE_URL").unwrap_or_else(|_| "http://127.0.0.1:12973".to_owned())
}
Network::Testnet => env::var("TESTNET_NODE_URL")
.unwrap_or_else(|_| "https://node.testnet.alephium.org".to_owned()),
Network::Mainnet => env::var("MAINNET_NODE_URL")
Expand Down Expand Up @@ -49,10 +50,7 @@ pub struct Client {

impl Client {
pub fn new(network: Network) -> Self {
Self {
inner: reqwest::Client::new(),
base_url: network.base_url()
}
Self { inner: reqwest::Client::new(), base_url: network.base_url() }
}

// List blocks on the given time interval.
Expand Down Expand Up @@ -115,4 +113,4 @@ impl Client {
let response = self.inner.get(url).send().await?.json().await?;
Ok(response)
}
}
}

0 comments on commit e286397

Please sign in to comment.