Skip to content

Commit 65c39cc

Browse files
authored
chore: fix rpc url for arb if no env var (#12320)
1 parent 8e0feda commit 65c39cc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

crates/test-utils/src/rpc.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,11 @@ fn next_url_inner(is_ws: bool, chain: NamedChain) -> String {
188188
}
189189

190190
if matches!(chain, Arbitrum) {
191-
return env::var("ARBITRUM_RPC").unwrap_or("https://arb1.arbitrum.io/rpc".to_string());
191+
let rpc_url = env::var("ARBITRUM_RPC").unwrap_or_default();
192+
if !rpc_url.is_empty() {
193+
return rpc_url;
194+
}
195+
return "https://arb1.arbitrum.io/rpc".to_string();
192196
}
193197

194198
let reth_works = true;

0 commit comments

Comments
 (0)