Skip to content

Commit 1b20812

Browse files
authored
fix: normalize address input for /versions/{address} (#914)
1 parent 4134c3a commit 1b20812

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

operator_tracker/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,9 @@ pub async fn get_operator_version(
193193
return Err(OperatorVersionError::BadRequest);
194194
}
195195

196+
let lowercase_address = address.to_lowercase();
196197
sqlx::query_as::<_, OperatorVersion>("SELECT * FROM operator_versions WHERE address = $1")
197-
.bind(address)
198+
.bind(lowercase_address)
198199
.fetch_optional(db)
199200
.await
200201
.map_err(|_| OperatorVersionError::InternalServerError)

0 commit comments

Comments
 (0)