-
Notifications
You must be signed in to change notification settings - Fork 360
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
Support multiple messages in CanExecute query #147
Conversation
49cd208
to
2276516
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.
Only one comment. LGTM
2276516
to
603950f
Compare
Since making queries is rather cheap and we now have a rather awkward The default case is just sending one message, and this makes that case noticibly more awkward. |
It is also a question how inteligent the query API is expected to be. What happens if you pass a bunch of bank send messages that are fine individually but together exceed the allowance. What's the purpose/use case of this API at all? |
The general idea was a generic way to query "can I do this?" without relying on the specifics (allowances/permissions only in cw1-subkeys). And yeah, it was not designed to be smart and handle messages interacting. I don't know if there will be other approaches than cw1-subkeys. But this was a way to generically query "am I allowed to send 100 Atoms?" before doing so (which could help in generic UIs). This can be removed and added later. Or just not supported in clients. I don't see adding more complexity here as beneficial. (I almost consider making |
Good point. Since the checks are stateful, it seems to me that to support this API we would need to reproduce the state changes to be able to validate the sequence of messages. Which may be difficult / costly to do.
Tests look nicer / simpler, but I agree, that's not enough of a use case to justify this. |
Not merging because impl not stateful when checking multiple messages. Better to provide simpler, clearer API. |
Closes the last part of #145, supporting multiple messages in CanExecute query.