-
Notifications
You must be signed in to change notification settings - Fork 57
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
feat(ens): updating name attributes handler #509
Conversation
e871d57
to
817da93
Compare
if a.len() != b.len() { | ||
/// Compare two values (either H160 or &str) in constant time to prevent timing | ||
/// attacks | ||
pub fn constant_time_eq(a: impl AsRef<[u8]>, b: impl AsRef<[u8]>) -> bool { |
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.
Making this function usable for strings and H160.
@@ -68,7 +68,7 @@ pub async fn delete_name( | |||
} | |||
|
|||
#[instrument(skip(postgres))] | |||
pub async fn update_name( | |||
pub async fn update_name_attributes( |
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.
Refactor this function name to reflect that it updates only attributes.
8c5fe98
to
21d8c27
Compare
817da93
to
78100e9
Compare
const updatedAttributes = { | ||
bio: 'integration test domain updated attribute', | ||
bio: randomBioString, |
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.
Changes to use the random value here.
78100e9
to
e8fab3a
Compare
e8fab3a
to
2d962a6
Compare
Description
This PR adds an endpoint handler to update name attributes according to the SPEC.
The following changes are made:
POST /v1/profile/account/:name/attributes
endpoint is added to handle the name attributes updating,How Has This Been Tested?
The integration test was added to this PR.
Due Diligence