Skip to content

Commit

Permalink
Torii fix extra url parse (#1506)
Browse files Browse the repository at this point in the history
  • Loading branch information
broody authored Feb 1, 2024
1 parent e348e0b commit 1e29ec3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions bin/torii/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,7 @@ async fn main() -> anyhow::Result<()> {

sqlx::migrate!("../../crates/torii/migrations").run(&pool).await?;

let provider: Arc<_> =
JsonRpcClient::new(HttpTransport::new(format!("http://{}", args.rpc).parse::<Url>()?))
.into();
let provider: Arc<_> = JsonRpcClient::new(HttpTransport::new(args.rpc)).into();

// Get world address
let world = WorldContractReader::new(args.world_address, &provider);
Expand Down
1 change: 0 additions & 1 deletion crates/common/src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ pub fn parse_url(value: &str) -> anyhow::Result<Url, URLParsingError> {

match Url::parse(value) {
Ok(url) => {
println!("{:?}", url);
// Check if the scheme is http or https
if url.scheme() != "https" && url.scheme() != "http" {
return Err(URLParsingError::InvalidScheme(url.scheme().to_string()));
Expand Down

0 comments on commit 1e29ec3

Please sign in to comment.