-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: emily filter updates from signers #1472
base: main
Are you sure you want to change the base?
Conversation
if is_unauthorized { | ||
return Err(Error::Forbidden); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should further limit the signers update to state transition from pending to accepted? Otherwise it could be possible that a signer change a confirmed deposit back to accepted. I looked around but I couldn't find anything preventing this, but maybe I'm missing something.
(status = 404, description = "Address not found", body = ErrorResponse), | ||
(status = 405, description = "Method not allowed", body = ErrorResponse), | ||
(status = 500, description = "Internal server error", body = ErrorResponse) | ||
), | ||
security(("ApiGatewayKey" = [])) | ||
)] | ||
#[instrument(skip(context))] | ||
#[instrument(skip(context, api_key))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: should we add the api_key
skip also to the other ApiGatewayKey
endpoints?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed for chainstate endpoints (seems like they were the only ones left) in 4ec3ad7
let is_unauthorized = body | ||
.withdrawals | ||
.iter() | ||
.any(|deposit| deposit.status != Status::Accepted); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit
.any(|deposit| deposit.status != Status::Accepted); | |
.any(|withdrawal| withdrawal.status != Status::Accepted); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 8b58e0f
// -------- | ||
let request_id = 1; | ||
|
||
// Setup test deposit transaction. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: s/deposit/withdrawal/, multiple occurrences
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 8b58e0f
Description
Closes: #1462
Changes
update_withdrawals
andupdate_deposits
now return 403 Forbidden if an api key of the public api (the signers) is trying to set an entry to a status !=Accepted
update_*
endpoints.Testing Information
Checklist: