Skip to content

Commit

Permalink
add new proposal type & status
Browse files Browse the repository at this point in the history
  • Loading branch information
lukachi committed Jun 27, 2024
1 parent 7ee0f30 commit 31030ae
Show file tree
Hide file tree
Showing 8 changed files with 895 additions and 797 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning].

## [1.5.0] - 2024-06-27
### Added
- `PROPOSAL_STATUS_INVALID` proposal status
- `ArbitrarySigningProposal` proposal type

## [1.4.8] - 2024-05-24
### Fixed
- `useProposalMetadata` metadata parsing
Expand Down Expand Up @@ -136,7 +141,8 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic

- Initiated project

[Unreleased]: https://gitlab.com/rarimo/scan/compare/1.4.8...HEAD
[Unreleased]: https://gitlab.com/rarimo/scan/compare/1.5.0...HEAD
[1.5.0]: https://gitlab.com/rarimo/scan/compare/1.4.8...1.5.0
[1.4.8]: https://gitlab.com/rarimo/scan/compare/1.4.7...1.4.8
[1.4.7]: https://gitlab.com/rarimo/scan/compare/1.4.6...1.4.7
[1.4.6]: https://gitlab.com/rarimo/scan/compare/1.4.5...1.4.6
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scan",
"version": "1.4.8",
"version": "1.5.0",
"private": true,
"gitHooks": {
"pre-commit": "yarn lint",
Expand All @@ -27,7 +27,7 @@
"@hookform/resolvers": "^3.3.1",
"@mui/icons-material": "^5.14.3",
"@mui/material": "^5.14.3",
"@rarimo/client": "^2.5.0",
"@rarimo/client": "^2.6.0",
"graphql": "^16.7.1",
"graphql-tag": "^2.12.6",
"lodash-es": "^4.17.21",
Expand Down
1 change: 1 addition & 0 deletions src/components/Proposal/ProposalStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export default function ProposalStatus({ status }: { status?: string | number })
case ProposalStatusEnum.Rejected:
return 'default'
case ProposalStatusEnum.Failed:
case ProposalStatusEnum.Invalid:
return 'error'
default:
return 'default'
Expand Down
1 change: 1 addition & 0 deletions src/const/proposals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const PROPOSAL_TYPES_MAP = {
'/cosmos.gov.v1beta1.TextProposal': ProposalType.Text,
'/rarimo.rarimocore.cscalist.ReplaceCSCAListProposal': ProposalType.ReplaceCSCAListProposal,
'/rarimo.rarimocore.cscalist.EditCSCAListProposal': ProposalType.EditCSCAListProposal,
'/rarimo.rarimocore.rarimocore.ArbitrarySigningProposal': ProposalType.ArbitrarySigningProposal,

ParameterChange: ProposalType.ParameterChange,
SoftwareUpgrade: ProposalType.SoftwareUpgrade,
Expand Down
2 changes: 2 additions & 0 deletions src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ export default {
"passed-lbl": "Passed",
"rejected-lbl": "Rejected",
"failed-lbl": "Failed",
"invalid-lbl": "Invalid",
"unrecognized-lbl": "Unknown",
},
"proposal-type": {
Expand Down Expand Up @@ -239,6 +240,7 @@ export default {
"text-lbl": "Text",
"edit-csca-list-lbl": "Edit CSCA List",
"replace-csca-list-lbl": "Replace CSCA List",
"arbitrary-signing-lbl": "Arbitrary Signing",
"unknown-lbl": "Unknown",
},
"proposal-vote": {
Expand Down
1 change: 1 addition & 0 deletions src/locales/localizers/proposal-status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const localizeProposalStatus = (t: TFunction, status: unknown): string =>
[ProposalStatus.Passed]: t('proposal-status.passed-lbl'),
[ProposalStatus.Rejected]: t('proposal-status.rejected-lbl'),
[ProposalStatus.Failed]: t('proposal-status.failed-lbl'),
[ProposalStatus.Invalid]: t('proposal-status.invalid-lbl'),
[ProposalStatus.Unrecognized]: t('proposal-status.unrecognized-lbl'),
}[proposalStatusFromJSON(String(status))]
}
1 change: 1 addition & 0 deletions src/locales/localizers/proposal-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ export const localizeProposalType = (t: TFunction, type: ProposalType) =>
[ProposalType.Text]: t('proposal-type.text-lbl'),
[ProposalType.EditCSCAListProposal]: t('proposal-type.edit-csca-list-lbl'),
[ProposalType.ReplaceCSCAListProposal]: t('proposal-type.replace-csca-list-lbl'),
[ProposalType.ArbitrarySigningProposal]: t('proposal-type.arbitrary-signing-lbl'),
}[type])
Loading

0 comments on commit 31030ae

Please sign in to comment.