Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

chore: fix error message #507

Merged
merged 1 commit into from
Jul 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

### 🐛 Fixes
- [499](https://github.com/vegaprotocol/protos/issues/499) - Add validation on vega `IDs` and public keys
- [506](https://github.com/vegaprotocol/protos/issues/506) - Fix validation error message



## 0.53.0
Expand Down
2 changes: 2 additions & 0 deletions commands/proposal_submission.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,8 @@ func checkUpdateMarketChanges(change *types.ProposalTerms_UpdateMarket) Errors {

if len(change.UpdateMarket.MarketId) == 0 {
errs.AddForProperty("proposal_submission.terms.change.update_market.market_id", ErrIsRequired)
} else if !IsVegaPubkey(change.UpdateMarket.MarketId) {
errs.AddForProperty("proposal_submission.terms.change.update_market.market_id", ErrShouldBeAValidVegaID)
}

if change.UpdateMarket.Changes == nil {
Expand Down
2 changes: 1 addition & 1 deletion commands/vote_submission.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func checkVoteSubmission(cmd *commandspb.VoteSubmission) Errors {
if len(cmd.ProposalId) <= 0 {
errs.AddForProperty("vote_submission.proposal_id", ErrIsRequired)
} else if !IsVegaPubkey(cmd.ProposalId) {
errs.AddForProperty("vote_submission.market_id", ErrShouldBeAValidVegaID)
errs.AddForProperty("vote_submission.proposal_id", ErrShouldBeAValidVegaID)
}

if cmd.Value == types.Vote_VALUE_UNSPECIFIED {
Expand Down