-
Notifications
You must be signed in to change notification settings - Fork 70
⚓ Integrate set era payout damping factor proposal #4818
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
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
92702a4
Fix InputNumber maxAllowedValue
thesan 41b3a00
Create set era payout damping factor proposals
thesan 023f673
Preview set era payout damping factor proposals
thesan 2fac8e6
Fix typo
thesan baaec86
Query `SetEraPayoutDampingFactorProposalDetails`
thesan aded88b
Use the proper percentageMapper to preview the proposal
thesan 220daa2
Compare with current multiplier value
thesan 2fc1507
Describe the proposal
thesan d2535be
Validate that the multiplier is at most 100%
thesan 66e4fa0
Make the NumberOfBlocks renderer reusable
thesan b120b09
Preview CRT constraints proposal
thesan a9850ee
Create CRT constraints proposal
thesan c3b0ef9
Query `UpdateTokenPalletTokenConstraintsProposalDetails`
thesan bd44e13
Schema and types
thesan 44bc262
Show current values in the form
thesan e914884
Show current values on the preview page
thesan f2496c4
Fix the vote on proposal modal
thesan a62b5e8
Fix mismatched values
thesan ada87e2
Show current values on field inputs sub label instead of message
thesan 852b0f1
Enable decimal values in `InputNumber`
thesan 3ad9514
Use decimal percent to represent part per million
thesan 9458833
Preview decimal percents
thesan 06b39b9
Merge branch 'feature/crt-constraints-proposal' into feature/luxor/re…
thesan 364101f
Generate queries
thesan e7bab76
Patch `@joystream/types`
thesan 30fbe31
Fix type issue
thesan 4185ef3
Merge branch 'luxor' of github.com:Joystream/pioneer into feature/lux…
thesan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
13,075 changes: 9,329 additions & 3,746 deletions
13,075
.yarn/patches/@joystream-types-npm-4.3.0-542438a0b6.patch
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/ui/src/common/api/queries/__generated__/baseTypes.generated.ts
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
packages/ui/src/council/queries/__generated__/council.generated.tsx
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...oposals/modals/AddNewProposal/components/SpecificParameters/SetEraPayoutDampingFactor.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import React from 'react' | ||
|
||
import { useApi } from '@/api/hooks/useApi' | ||
import { InputComponent, InputNumber } from '@/common/components/forms' | ||
import { Row } from '@/common/components/Modal' | ||
import { RowGapBlock } from '@/common/components/page/PageContent' | ||
import { TextMedium } from '@/common/components/typography' | ||
import { useFirstObservableValue } from '@/common/hooks/useFirstObservableValue' | ||
|
||
export const SetEraPayoutDampingFactor = () => { | ||
const { api } = useApi() | ||
const current = useFirstObservableValue(() => api?.query.council.eraPayoutDampingFactor(), [api?.isConnected]) | ||
|
||
return ( | ||
<RowGapBlock gap={24}> | ||
<Row> | ||
<RowGapBlock gap={8}> | ||
<h4>Specific parameters</h4> | ||
<TextMedium lighter> | ||
Set the validator reward multiplier. {current && `The current value is ${current.toNumber()}%`}. | ||
</TextMedium> | ||
</RowGapBlock> | ||
</Row> | ||
<Row> | ||
<RowGapBlock gap={20}> | ||
<InputComponent | ||
message={'Amount must be greater than zero'} | ||
id="damping-factor-input" | ||
name="setEraPayoutDampingFactor.dampingFactor" | ||
label="Validator reward multiplier" | ||
tight | ||
units="%" | ||
required | ||
> | ||
<InputNumber id="damping-factor-input" name="setEraPayoutDampingFactor.dampingFactor" placeholder="100" /> | ||
</InputComponent> | ||
</RowGapBlock> | ||
</Row> | ||
</RowGapBlock> | ||
) | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.