Skip to content

Commit

Permalink
rusk-wallet: fix url
Browse files Browse the repository at this point in the history
  • Loading branch information
herr-seppia committed Sep 13, 2024
1 parent 8bfef04 commit bcad8ce
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rusk-wallet/src/rues.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ pub struct RuesHttpClient {
impl RuesHttpClient {
/// Create a new HTTP Client
pub fn new(uri: String) -> Self {
let uri = uri + "/on";
Self { uri }
}

Expand Down Expand Up @@ -89,8 +88,10 @@ impl RuesHttpClient {
let uri = &self.uri;
let client = reqwest::Client::new();
let entity = entity.into().map(|e| format!(":{e}")).unwrap_or_default();

let rues_prefix = if uri.ends_with('/') { "on" } else { "/on" };
let mut request = client
.post(format!("{uri}/{target}{entity}/{topic}"))
.post(format!("{uri}{rues_prefix}/{target}{entity}/{topic}"))
.body(Body::from(data.to_vec()))
.header("Content-Type", "application/octet-stream")
.header("rusk-version", REQUIRED_RUSK_VERSION);
Expand Down

0 comments on commit bcad8ce

Please sign in to comment.