diff --git a/packages/page-democracy/src/Overview/Voting.tsx b/packages/page-democracy/src/Overview/Voting.tsx index 828537b9e0..cd4c836bec 100644 --- a/packages/page-democracy/src/Overview/Voting.tsx +++ b/packages/page-democracy/src/Overview/Voting.tsx @@ -70,32 +70,54 @@ function Voting ({ proposal, referendumId }: Props): React.ReactElement | {isVotingOpen && ( - - {isCurrentVote && ( - - )} - - + + + + + +

{t('The vote will be recorded for this account. If another account delegated to this one, the delegated votes will also be counted.')}

+
+
+ + + {isCurrentVote && ( + + )} + + + +

{t('The balance associated with the vote will be locked as per the conviction specified nd will not be available for transfer or spend during this period.')}

+

{t('Conviction locks do overlap and is additive, meaning that funds locked during a previous vote can be locked again.')}

+
+
+ + + + + +

{t('Register the vote for or against the proposal.')}

+
+
setValues( + const _onChangeWithSi = useCallback( + (input: string, si: SiDef | null) => setValues( getValuesFromString(input, si, bitLength, isZeroable, maxValue) ), - [bitLength, isZeroable, maxValue, si] + [bitLength, isZeroable, maxValue] + ); + + const _onChange = useCallback( + (input: string) => _onChangeWithSi(input, si), + [_onChangeWithSi, si] ); const _onKeyDown = useCallback( @@ -221,8 +226,13 @@ function InputNumber ({ bitLength = DEFAULT_BITLENGTH, className, defaultValue = ); const _onSelectSiUnit = useCallback( - (siUnit: string) => setSi(formatBalance.findSi(siUnit)), - [] + (siUnit: string): void => { + const si = formatBalance.findSi(siUnit); + + setSi(si); + _onChangeWithSi(value, si); + }, + [_onChangeWithSi, value] ); const maxValueLength = getGlobalMaxValue(bitLength).toString().length - 1;