-
Notifications
You must be signed in to change notification settings - Fork 56
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
fix: remove quotes from libwaku's returned enr string #3097
Conversation
You can find the image built from this PR at
Built from eb46d96 |
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.
LGTM!
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.
LGTM! Thanks! 🙌
@@ -30,7 +30,7 @@ proc process*( | |||
of RETRIEVE_LISTENING_ADDRESSES: | |||
return ok($(%*waku.node.getMultiaddresses())) | |||
of RETRIEVE_MY_ENR: | |||
return ok($(%*waku.node.enr.toURI())) | |||
return ok(waku.node.enr.toURI()) |
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.
Maybe we need to do the same with the other cases
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.
There's only one additional case, RETRIEVE_LISTENING_ADDRESSES
, and I think it's needed there because the result of getMultiaddresses()
is a sequence, so we need to convert the sequence to a string. However, I'm not sure why it was implemented this way and not just used the $
operator on the sequence
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.
I'll go ahead and merge this change, and once we get to the usage of RETRIEVE_LISTENING_ADDRESSES
will revisit if the %*
is necessary or not, but their case is definitely different and makes more sense
Description
In libwaku, when processing a
RETRIEVE_MY_ENR
request we are adding an extra"
in the beginning and in the end of the string.This is necessary for
RETRIEVE_LISTENING_ADDRESSES
because we have to convert a sequence to a string, but forRETRIEVE_MY_ENR
which already has a return type of type string, this ends up adding extra quotes.Changes
RETRIEVE_MY_ENR
as isIssue
#3039