Skip to content
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

Add a EmitTypeEvent function that doesn't add double quotes to string attributes #5

Merged
merged 2 commits into from
Aug 21, 2024

Conversation

zale144
Copy link
Contributor

@zale144 zale144 commented Aug 21, 2024

Note that emitting such typed events that have complex attributes (slices, structs...) might look ugly.

@zale144 zale144 requested a review from danwt August 21, 2024 08:24
@zale144 zale144 self-assigned this Aug 21, 2024
Copy link
Collaborator

@danwt danwt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess from the pr name this is to make things prettier, but that's not mentioned in the code

But nice to see this repo growing ❤️

utils/uevent/events.go Show resolved Hide resolved
Comment on lines 15 to 16
// EmitTypedEvent takes a typed event and emits it
func EmitTypedEvent(ctx sdk.Context, tev proto.Message) error {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can just call it EmitTyped since it's in uevent

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this follows the original naming in the sdk

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sir 🙏

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure? this will mean renaming it all over the hub repo, and anywhere else where this method is used.

utils/uevent/events.go Show resolved Hide resolved
@zale144 zale144 requested a review from danwt August 21, 2024 09:03
@danwt danwt merged commit a6f8c61 into main Aug 21, 2024
@danwt danwt deleted the zale144/emit-type-event-no-double-quotes branch August 21, 2024 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants