Skip to content

Commit

Permalink
fix: use default prover network url (#1943)
Browse files Browse the repository at this point in the history
  • Loading branch information
nhtyy authored Jan 17, 2025
1 parent 2cb0849 commit d4234cd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions crates/sdk/src/network/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
//!
//! This module provides a builder for the [`NetworkProver`].
use crate::network::DEFAULT_NETWORK_RPC_URL;
use crate::NetworkProver;

/// A builder for the [`NetworkProver`].
Expand Down Expand Up @@ -83,10 +84,7 @@ impl NetworkProverBuilder {

let rpc_url = match self.rpc_url {
Some(rpc_url) => rpc_url,
None => std::env::var("NETWORK_RPC_URL").expect(
"NETWORK_RPC_URL environment variable is not set. \
Please set it to your rpc url or use the .rpc_url() method.",
),
None => std::env::var("NETWORK_RPC_URL").unwrap_or(DEFAULT_NETWORK_RPC_URL.to_string()),
};

NetworkProver::new(&private_key, &rpc_url)
Expand Down

0 comments on commit d4234cd

Please sign in to comment.