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

Refactoring: Move identifier checks into Context::get{Input, Reference} #18

Open
siburu opened this issue Jul 9, 2021 · 0 comments
Open

Comments

@siburu
Copy link
Contributor

siburu commented Jul 9, 2021

The following is an example of the current situation.

val client = ctx.getReference<ClientState>()
require(client.id == Identifier(msg.clientId)){"mismatch client"}

This is a boring and error-prone code.
The process of getting a state followed by checking the identifier of it should be combined into a single method.

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

No branches or pull requests

1 participant