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

Added MsgUpdateProjectDoc to project module #230

Merged

Conversation

stefaniatadama
Copy link
Collaborator

MsgUpdateProjectDoc allows the user to update the project doc associated to a project. It is expected to fail if any of the following hold/s:

  • project DID or sender DID are empty or invalid
  • project doc is not in JSON format
  • project doc fees are invalid/do not exist
  • project doc editor is not the project creator
  • project's current status is STARTED, STOPPED, or PAIDOUT.

@stefaniatadama stefaniatadama merged commit e5accc0 into stefania/update_to_cosmos_0_40 May 27, 2021
@@ -16,6 +16,7 @@ service Msg {
rpc CreateClaim(MsgCreateClaim) returns (MsgCreateClaimResponse);
rpc CreateEvaluation(MsgCreateEvaluation) returns (MsgCreateEvaluationResponse);
rpc WithdrawFunds(MsgWithdrawFunds) returns (MsgWithdrawFundsResponse);
rpc UpdateProjectDoc(MsgUpdateProjectDoc) returns (MsgUpdateProjectDocResponse);
Copy link
Collaborator

Choose a reason for hiding this comment

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

In general I would have preferred if this new message was placed under CreateProject in terms of ordering. So we have 'CreateProject', 'UpdateProjectDoc', 'UpdateProjectStatus', ...

@@ -23,6 +23,7 @@ func registerTxHandlers(clientCtx client.Context, r *mux.Router) {
r.HandleFunc("/project/create_claim", createClaimRequestHandler(clientCtx)).Methods("POST")
r.HandleFunc("/project/create_evaluation", createEvaluationRequestHandler(clientCtx)).Methods("POST")
r.HandleFunc("/project/withdraw_funds", withdrawFundsRequestHandler(clientCtx)).Methods("POST")
r.Handle("/project/update_project_doc", updateProjectDocRequestHandler(clientCtx)).Methods("PUT")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why the difference here? Others are all HandleFunc and POST and this one is Handle and PUT.

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.

None yet

2 participants