Skip to content

Commit

Permalink
Fix: double slash in GET transactions (#45)
Browse files Browse the repository at this point in the history
* Fix: extra slashes in URL

* clippy
  • Loading branch information
anna-carroll authored Oct 4, 2024
1 parent 517b825 commit 8826a23
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/builder/src/tasks/tx_poller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use alloy::consensus::TxEnvelope;
use alloy_primitives::TxHash;

use eyre::Error;
use reqwest::Client;
use reqwest::{Client, Url};
use serde::{Deserialize, Serialize};
use serde_json::from_slice;
use tokio::sync::mpsc;
Expand Down Expand Up @@ -42,7 +42,8 @@ impl TxPoller {
/// unique transactions that haven't been seen before are sent into the builder pipeline.
pub async fn check_tx_pool(&mut self) -> Result<Vec<TxEnvelope>, Error> {
let mut unique: Vec<TxEnvelope> = Vec::new();
let result = self.client.get(self.config.tx_pool_url.to_string() + "/get").send().await?;
let url: Url = Url::parse(&self.config.tx_pool_url)?.join("get")?;
let result = self.client.get(url).send().await?;
let parsed: Vec<TxPoolResponse> = from_slice(&result.bytes().await?)?;

parsed.iter().for_each(|entry| {
Expand Down

0 comments on commit 8826a23

Please sign in to comment.