Skip to content

Commit

Permalink
fix: normalize address input for /versions/{address} (#914)
Browse files Browse the repository at this point in the history
  • Loading branch information
JuArce authored Sep 3, 2024
1 parent 4134c3a commit 1b20812
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion operator_tracker/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,9 @@ pub async fn get_operator_version(
return Err(OperatorVersionError::BadRequest);
}

let lowercase_address = address.to_lowercase();
sqlx::query_as::<_, OperatorVersion>("SELECT * FROM operator_versions WHERE address = $1")
.bind(address)
.bind(lowercase_address)
.fetch_optional(db)
.await
.map_err(|_| OperatorVersionError::InternalServerError)
Expand Down

0 comments on commit 1b20812

Please sign in to comment.