-
Notifications
You must be signed in to change notification settings - Fork 353
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 cw4 hooks #156
Add cw4 hooks #156
Conversation
517f077
to
fe3512e
Compare
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.
let mut ctx = Context::new(); | ||
for h in HOOKS.may_load(deps.storage)?.unwrap_or_default() { | ||
let msg = diff.clone().into_cosmos_msg(h)?; | ||
ctx.add_message(msg); | ||
} |
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.
Nice, this would be similar to creating a msgs
which is a Vec<CosmosMsg>
, and attaching it to a HandleResponse
.
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.
Exactly, the Context was made to make that look a bit nicer.
Jury still a bit out if it is better, but happy for opinions.
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 it's because I'm just used to it, but I like the other variant better.
Closes #140