Skip to content

Commit 26ed7a8

Browse files
Fix string type in receipts query
1 parent 73a0ec2 commit 26ed7a8

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

aggregation_mode/batcher/src/server/http.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ impl BatcherServer {
165165
&data.message.proof,
166166
&data.message.program_vk_commitment,
167167
None,
168-
data.nonce,
168+
data.nonce as i64,
169169
)
170170
.await
171171
{
@@ -201,17 +201,12 @@ impl BatcherServer {
201201

202202
let state = state.get_ref();
203203

204-
let Some(address_raw) = params.address.clone() else {
205-
return HttpResponse::BadRequest()
206-
.json(AppResponse::new_unsucessfull("Missing address", 400));
207-
};
208-
209-
if !Self::is_valid_eth_address(&address_raw) {
204+
if !Self::is_valid_eth_address(&params.address.clone()) {
210205
return HttpResponse::BadRequest()
211206
.json(AppResponse::new_unsucessfull("Invalid address", 400));
212207
}
213208

214-
let address = address_raw.to_lowercase();
209+
let address = params.address.to_lowercase();
215210

216211
let receipts = if let Some(nonce) = params.nonce {
217212
match state

aggregation_mode/batcher/src/server/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl AppResponse {
3131
/// Query parameters accepted by `GET /proof/merkle`, containing an optional proof id.
3232
#[derive(Deserialize, Clone)]
3333
pub(super) struct GetReceiptsQueryParams {
34-
pub address: Option<String>,
34+
pub address: String,
3535
pub nonce: Option<i64>,
3636
}
3737

0 commit comments

Comments
 (0)