diff --git a/i18next-scanner.config.js b/i18next-scanner.config.js index 6bc7ea452..e3c3e18d1 100644 --- a/i18next-scanner.config.js +++ b/i18next-scanner.config.js @@ -48,6 +48,7 @@ module.exports = { loadPath: 'locales/{{lng}}/{{ns}}.json', savePath: 'locales/{{lng}}/{{ns}}.json', jsonIndent: 2, + lineEnding: '\n', }, keySeparator: false, }, diff --git a/locales/bg/translation.json b/locales/bg/translation.json index 23e3cd068..e1b94a18b 100644 --- a/locales/bg/translation.json +++ b/locales/bg/translation.json @@ -547,5 +547,12 @@ "Including a share of minority voters' deposit": "Including a share of minority voters' deposit", "Your max reward": "Your max reward", "Paid to oracles": "Paid to oracles", - "Paid to owner": "Paid to owner" + "Paid to owner": "Paid to owner", + "The number of randomly selected oracles allowed to vote": "The number of randomly selected oracles allowed to vote", + "Cost of voting": "Cost of voting", + "Total funds": "Total funds", + "Total funds locked during the voting and paid to oracles and owner afterwards": "Total funds locked during the voting and paid to oracles and owner afterwards", + "Min reward per oracle: {{amount}}": "Min reward per oracle: {{amount}}", + "% of the Total funds you receive": "% of the Total funds you receive", + "Paid to owner: {{amount}}": "Paid to owner: {{amount}}" } diff --git a/locales/de/translation.json b/locales/de/translation.json index 4d7eceb43..afe21ffc8 100644 --- a/locales/de/translation.json +++ b/locales/de/translation.json @@ -544,5 +544,12 @@ "Including a share of minority voters' deposit": "Including a share of minority voters' deposit", "Your max reward": "Your max reward", "Paid to oracles": "Paid to oracles", - "Paid to owner": "Paid to owner" + "Paid to owner": "Paid to owner", + "The number of randomly selected oracles allowed to vote": "The number of randomly selected oracles allowed to vote", + "Cost of voting": "Cost of voting", + "Total funds": "Total funds", + "Total funds locked during the voting and paid to oracles and owner afterwards": "Total funds locked during the voting and paid to oracles and owner afterwards", + "Min reward per oracle: {{amount}}": "Min reward per oracle: {{amount}}", + "% of the Total funds you receive": "% of the Total funds you receive", + "Paid to owner: {{amount}}": "Paid to owner: {{amount}}" } diff --git a/locales/en/translation.json b/locales/en/translation.json index f14e65ed5..96e8fe2e3 100644 --- a/locales/en/translation.json +++ b/locales/en/translation.json @@ -547,5 +547,12 @@ "Including a share of minority voters' deposit": "Including a share of minority voters' deposit", "Your max reward": "Your max reward", "Paid to oracles": "Paid to oracles", - "Paid to owner": "Paid to owner" + "Paid to owner": "Paid to owner", + "The number of randomly selected oracles allowed to vote": "The number of randomly selected oracles allowed to vote", + "Cost of voting": "Cost of voting", + "Total funds": "Total funds", + "Total funds locked during the voting and paid to oracles and owner afterwards": "Total funds locked during the voting and paid to oracles and owner afterwards", + "Min reward per oracle: {{amount}}": "Min reward per oracle: {{amount}}", + "% of the Total funds you receive": "% of the Total funds you receive", + "Paid to owner: {{amount}}": "Paid to owner: {{amount}}" } diff --git a/locales/es/translation.json b/locales/es/translation.json index f3a3bfa24..ea0c4f955 100644 --- a/locales/es/translation.json +++ b/locales/es/translation.json @@ -544,5 +544,12 @@ "Including a share of minority voters' deposit": "Including a share of minority voters' deposit", "Your max reward": "Your max reward", "Paid to oracles": "Paid to oracles", - "Paid to owner": "Paid to owner" + "Paid to owner": "Paid to owner", + "The number of randomly selected oracles allowed to vote": "The number of randomly selected oracles allowed to vote", + "Cost of voting": "Cost of voting", + "Total funds": "Total funds", + "Total funds locked during the voting and paid to oracles and owner afterwards": "Total funds locked during the voting and paid to oracles and owner afterwards", + "Min reward per oracle: {{amount}}": "Min reward per oracle: {{amount}}", + "% of the Total funds you receive": "% of the Total funds you receive", + "Paid to owner: {{amount}}": "Paid to owner: {{amount}}" } diff --git a/locales/fr/translation.json b/locales/fr/translation.json index 8cf0255d6..0571abcb4 100644 --- a/locales/fr/translation.json +++ b/locales/fr/translation.json @@ -547,5 +547,12 @@ "Including a share of minority voters' deposit": "Including a share of minority voters' deposit", "Your max reward": "Your max reward", "Paid to oracles": "Paid to oracles", - "Paid to owner": "Paid to owner" + "Paid to owner": "Paid to owner", + "The number of randomly selected oracles allowed to vote": "The number of randomly selected oracles allowed to vote", + "Cost of voting": "Cost of voting", + "Total funds": "Total funds", + "Total funds locked during the voting and paid to oracles and owner afterwards": "Total funds locked during the voting and paid to oracles and owner afterwards", + "Min reward per oracle: {{amount}}": "Min reward per oracle: {{amount}}", + "% of the Total funds you receive": "% of the Total funds you receive", + "Paid to owner: {{amount}}": "Paid to owner: {{amount}}" } diff --git a/locales/hi/translation.json b/locales/hi/translation.json index fc480fdb6..c01b15d16 100644 --- a/locales/hi/translation.json +++ b/locales/hi/translation.json @@ -547,5 +547,12 @@ "Including a share of minority voters' deposit": "Including a share of minority voters' deposit", "Your max reward": "Your max reward", "Paid to oracles": "Paid to oracles", - "Paid to owner": "Paid to owner" + "Paid to owner": "Paid to owner", + "The number of randomly selected oracles allowed to vote": "The number of randomly selected oracles allowed to vote", + "Cost of voting": "Cost of voting", + "Total funds": "Total funds", + "Total funds locked during the voting and paid to oracles and owner afterwards": "Total funds locked during the voting and paid to oracles and owner afterwards", + "Min reward per oracle: {{amount}}": "Min reward per oracle: {{amount}}", + "% of the Total funds you receive": "% of the Total funds you receive", + "Paid to owner: {{amount}}": "Paid to owner: {{amount}}" } diff --git a/locales/hr/translation.json b/locales/hr/translation.json index c02a677a7..890a85a48 100644 --- a/locales/hr/translation.json +++ b/locales/hr/translation.json @@ -550,5 +550,12 @@ "Including a share of minority voters' deposit": "Including a share of minority voters' deposit", "Your max reward": "Your max reward", "Paid to oracles": "Paid to oracles", - "Paid to owner": "Paid to owner" + "Paid to owner": "Paid to owner", + "The number of randomly selected oracles allowed to vote": "The number of randomly selected oracles allowed to vote", + "Cost of voting": "Cost of voting", + "Total funds": "Total funds", + "Total funds locked during the voting and paid to oracles and owner afterwards": "Total funds locked during the voting and paid to oracles and owner afterwards", + "Min reward per oracle: {{amount}}": "Min reward per oracle: {{amount}}", + "% of the Total funds you receive": "% of the Total funds you receive", + "Paid to owner: {{amount}}": "Paid to owner: {{amount}}" } diff --git a/locales/id/translation.json b/locales/id/translation.json index a5c163c66..836f9d737 100644 --- a/locales/id/translation.json +++ b/locales/id/translation.json @@ -540,5 +540,12 @@ "Including a share of minority voters' deposit": "Including a share of minority voters' deposit", "Your max reward": "Your max reward", "Paid to oracles": "Paid to oracles", - "Paid to owner": "Paid to owner" + "Paid to owner": "Paid to owner", + "The number of randomly selected oracles allowed to vote": "The number of randomly selected oracles allowed to vote", + "Cost of voting": "Cost of voting", + "Total funds": "Total funds", + "Total funds locked during the voting and paid to oracles and owner afterwards": "Total funds locked during the voting and paid to oracles and owner afterwards", + "Min reward per oracle: {{amount}}": "Min reward per oracle: {{amount}}", + "% of the Total funds you receive": "% of the Total funds you receive", + "Paid to owner: {{amount}}": "Paid to owner: {{amount}}" } diff --git a/locales/it/translation.json b/locales/it/translation.json index 1b7d90102..f6ee539ed 100644 --- a/locales/it/translation.json +++ b/locales/it/translation.json @@ -544,5 +544,12 @@ "Including a share of minority voters' deposit": "Including a share of minority voters' deposit", "Your max reward": "Your max reward", "Paid to oracles": "Paid to oracles", - "Paid to owner": "Paid to owner" + "Paid to owner": "Paid to owner", + "The number of randomly selected oracles allowed to vote": "The number of randomly selected oracles allowed to vote", + "Cost of voting": "Cost of voting", + "Total funds": "Total funds", + "Total funds locked during the voting and paid to oracles and owner afterwards": "Total funds locked during the voting and paid to oracles and owner afterwards", + "Min reward per oracle: {{amount}}": "Min reward per oracle: {{amount}}", + "% of the Total funds you receive": "% of the Total funds you receive", + "Paid to owner: {{amount}}": "Paid to owner: {{amount}}" } diff --git a/locales/ja/translation.json b/locales/ja/translation.json index b88c46ef4..b1acff63e 100644 --- a/locales/ja/translation.json +++ b/locales/ja/translation.json @@ -541,5 +541,12 @@ "Including a share of minority voters' deposit": "Including a share of minority voters' deposit", "Your max reward": "Your max reward", "Paid to oracles": "Paid to oracles", - "Paid to owner": "Paid to owner" + "Paid to owner": "Paid to owner", + "The number of randomly selected oracles allowed to vote": "The number of randomly selected oracles allowed to vote", + "Cost of voting": "Cost of voting", + "Total funds": "Total funds", + "Total funds locked during the voting and paid to oracles and owner afterwards": "Total funds locked during the voting and paid to oracles and owner afterwards", + "Min reward per oracle: {{amount}}": "Min reward per oracle: {{amount}}", + "% of the Total funds you receive": "% of the Total funds you receive", + "Paid to owner: {{amount}}": "Paid to owner: {{amount}}" } diff --git a/locales/ko/translation.json b/locales/ko/translation.json index 44dca53a0..3fef4c600 100644 --- a/locales/ko/translation.json +++ b/locales/ko/translation.json @@ -538,5 +538,12 @@ "Including a share of minority voters' deposit": "Including a share of minority voters' deposit", "Your max reward": "Your max reward", "Paid to oracles": "Paid to oracles", - "Paid to owner": "Paid to owner" + "Paid to owner": "Paid to owner", + "The number of randomly selected oracles allowed to vote": "The number of randomly selected oracles allowed to vote", + "Cost of voting": "Cost of voting", + "Total funds": "Total funds", + "Total funds locked during the voting and paid to oracles and owner afterwards": "Total funds locked during the voting and paid to oracles and owner afterwards", + "Min reward per oracle: {{amount}}": "Min reward per oracle: {{amount}}", + "% of the Total funds you receive": "% of the Total funds you receive", + "Paid to owner: {{amount}}": "Paid to owner: {{amount}}" } diff --git a/locales/pl/translation.json b/locales/pl/translation.json index 5b827b9a7..07b9f2cd5 100644 --- a/locales/pl/translation.json +++ b/locales/pl/translation.json @@ -547,5 +547,12 @@ "Including a share of minority voters' deposit": "Including a share of minority voters' deposit", "Your max reward": "Your max reward", "Paid to oracles": "Paid to oracles", - "Paid to owner": "Paid to owner" + "Paid to owner": "Paid to owner", + "The number of randomly selected oracles allowed to vote": "The number of randomly selected oracles allowed to vote", + "Cost of voting": "Cost of voting", + "Total funds": "Total funds", + "Total funds locked during the voting and paid to oracles and owner afterwards": "Total funds locked during the voting and paid to oracles and owner afterwards", + "Min reward per oracle: {{amount}}": "Min reward per oracle: {{amount}}", + "% of the Total funds you receive": "% of the Total funds you receive", + "Paid to owner: {{amount}}": "Paid to owner: {{amount}}" } diff --git a/locales/pt/translation.json b/locales/pt/translation.json index 601950123..099b43df9 100644 --- a/locales/pt/translation.json +++ b/locales/pt/translation.json @@ -544,5 +544,12 @@ "Including a share of minority voters' deposit": "Including a share of minority voters' deposit", "Your max reward": "Your max reward", "Paid to oracles": "Paid to oracles", - "Paid to owner": "Paid to owner" + "Paid to owner": "Paid to owner", + "The number of randomly selected oracles allowed to vote": "The number of randomly selected oracles allowed to vote", + "Cost of voting": "Cost of voting", + "Total funds": "Total funds", + "Total funds locked during the voting and paid to oracles and owner afterwards": "Total funds locked during the voting and paid to oracles and owner afterwards", + "Min reward per oracle: {{amount}}": "Min reward per oracle: {{amount}}", + "% of the Total funds you receive": "% of the Total funds you receive", + "Paid to owner: {{amount}}": "Paid to owner: {{amount}}" } diff --git a/locales/ro/translation.json b/locales/ro/translation.json index 8ff97fc24..e709492c1 100644 --- a/locales/ro/translation.json +++ b/locales/ro/translation.json @@ -544,5 +544,12 @@ "Including a share of minority voters' deposit": "Including a share of minority voters' deposit", "Your max reward": "Your max reward", "Paid to oracles": "Paid to oracles", - "Paid to owner": "Paid to owner" + "Paid to owner": "Paid to owner", + "The number of randomly selected oracles allowed to vote": "The number of randomly selected oracles allowed to vote", + "Cost of voting": "Cost of voting", + "Total funds": "Total funds", + "Total funds locked during the voting and paid to oracles and owner afterwards": "Total funds locked during the voting and paid to oracles and owner afterwards", + "Min reward per oracle: {{amount}}": "Min reward per oracle: {{amount}}", + "% of the Total funds you receive": "% of the Total funds you receive", + "Paid to owner: {{amount}}": "Paid to owner: {{amount}}" } diff --git a/locales/ru/translation.json b/locales/ru/translation.json index 7d1dd7434..2bf6d922b 100644 --- a/locales/ru/translation.json +++ b/locales/ru/translation.json @@ -544,5 +544,12 @@ "Including a share of minority voters' deposit": "Including a share of minority voters' deposit", "Your max reward": "Your max reward", "Paid to oracles": "Paid to oracles", - "Paid to owner": "Paid to owner" + "Paid to owner": "Paid to owner", + "The number of randomly selected oracles allowed to vote": "The number of randomly selected oracles allowed to vote", + "Cost of voting": "Cost of voting", + "Total funds": "Total funds", + "Total funds locked during the voting and paid to oracles and owner afterwards": "Total funds locked during the voting and paid to oracles and owner afterwards", + "Min reward per oracle: {{amount}}": "Min reward per oracle: {{amount}}", + "% of the Total funds you receive": "% of the Total funds you receive", + "Paid to owner: {{amount}}": "Paid to owner: {{amount}}" } diff --git a/locales/sl/translation.json b/locales/sl/translation.json index 377d9745a..ccf46e283 100644 --- a/locales/sl/translation.json +++ b/locales/sl/translation.json @@ -556,5 +556,12 @@ "Including a share of minority voters' deposit": "Including a share of minority voters' deposit", "Your max reward": "Your max reward", "Paid to oracles": "Paid to oracles", - "Paid to owner": "Paid to owner" + "Paid to owner": "Paid to owner", + "The number of randomly selected oracles allowed to vote": "The number of randomly selected oracles allowed to vote", + "Cost of voting": "Cost of voting", + "Total funds": "Total funds", + "Total funds locked during the voting and paid to oracles and owner afterwards": "Total funds locked during the voting and paid to oracles and owner afterwards", + "Min reward per oracle: {{amount}}": "Min reward per oracle: {{amount}}", + "% of the Total funds you receive": "% of the Total funds you receive", + "Paid to owner: {{amount}}": "Paid to owner: {{amount}}" } diff --git a/locales/sr/translation.json b/locales/sr/translation.json index 88297bab4..1d40d07c0 100644 --- a/locales/sr/translation.json +++ b/locales/sr/translation.json @@ -550,5 +550,12 @@ "Including a share of minority voters' deposit": "Including a share of minority voters' deposit", "Your max reward": "Your max reward", "Paid to oracles": "Paid to oracles", - "Paid to owner": "Paid to owner" + "Paid to owner": "Paid to owner", + "The number of randomly selected oracles allowed to vote": "The number of randomly selected oracles allowed to vote", + "Cost of voting": "Cost of voting", + "Total funds": "Total funds", + "Total funds locked during the voting and paid to oracles and owner afterwards": "Total funds locked during the voting and paid to oracles and owner afterwards", + "Min reward per oracle: {{amount}}": "Min reward per oracle: {{amount}}", + "% of the Total funds you receive": "% of the Total funds you receive", + "Paid to owner: {{amount}}": "Paid to owner: {{amount}}" } diff --git a/locales/sv/translation.json b/locales/sv/translation.json index 1bb9da065..a62279efd 100644 --- a/locales/sv/translation.json +++ b/locales/sv/translation.json @@ -541,5 +541,12 @@ "Including a share of minority voters' deposit": "Including a share of minority voters' deposit", "Your max reward": "Your max reward", "Paid to oracles": "Paid to oracles", - "Paid to owner": "Paid to owner" + "Paid to owner": "Paid to owner", + "The number of randomly selected oracles allowed to vote": "The number of randomly selected oracles allowed to vote", + "Cost of voting": "Cost of voting", + "Total funds": "Total funds", + "Total funds locked during the voting and paid to oracles and owner afterwards": "Total funds locked during the voting and paid to oracles and owner afterwards", + "Min reward per oracle: {{amount}}": "Min reward per oracle: {{amount}}", + "% of the Total funds you receive": "% of the Total funds you receive", + "Paid to owner: {{amount}}": "Paid to owner: {{amount}}" } diff --git a/locales/tr/translation.json b/locales/tr/translation.json index 77e249660..c3321106c 100644 --- a/locales/tr/translation.json +++ b/locales/tr/translation.json @@ -543,5 +543,12 @@ "Including a share of minority voters' deposit": "Including a share of minority voters' deposit", "Your max reward": "Your max reward", "Paid to oracles": "Paid to oracles", - "Paid to owner": "Paid to owner" + "Paid to owner": "Paid to owner", + "The number of randomly selected oracles allowed to vote": "The number of randomly selected oracles allowed to vote", + "Cost of voting": "Cost of voting", + "Total funds": "Total funds", + "Total funds locked during the voting and paid to oracles and owner afterwards": "Total funds locked during the voting and paid to oracles and owner afterwards", + "Min reward per oracle: {{amount}}": "Min reward per oracle: {{amount}}", + "% of the Total funds you receive": "% of the Total funds you receive", + "Paid to owner: {{amount}}": "Paid to owner: {{amount}}" } diff --git a/locales/uk/translation.json b/locales/uk/translation.json index 4e69e84a2..176bea1a9 100644 --- a/locales/uk/translation.json +++ b/locales/uk/translation.json @@ -550,5 +550,12 @@ "Including a share of minority voters' deposit": "Including a share of minority voters' deposit", "Your max reward": "Your max reward", "Paid to oracles": "Paid to oracles", - "Paid to owner": "Paid to owner" + "Paid to owner": "Paid to owner", + "The number of randomly selected oracles allowed to vote": "The number of randomly selected oracles allowed to vote", + "Cost of voting": "Cost of voting", + "Total funds": "Total funds", + "Total funds locked during the voting and paid to oracles and owner afterwards": "Total funds locked during the voting and paid to oracles and owner afterwards", + "Min reward per oracle: {{amount}}": "Min reward per oracle: {{amount}}", + "% of the Total funds you receive": "% of the Total funds you receive", + "Paid to owner: {{amount}}": "Paid to owner: {{amount}}" } diff --git a/locales/zh/translation.json b/locales/zh/translation.json index 69c129c5e..b6c4677b9 100644 --- a/locales/zh/translation.json +++ b/locales/zh/translation.json @@ -538,5 +538,12 @@ "Including a share of minority voters' deposit": "Including a share of minority voters' deposit", "Your max reward": "Your max reward", "Paid to oracles": "Paid to oracles", - "Paid to owner": "Paid to owner" + "Paid to owner": "Paid to owner", + "The number of randomly selected oracles allowed to vote": "The number of randomly selected oracles allowed to vote", + "Cost of voting": "Cost of voting", + "Total funds": "Total funds", + "Total funds locked during the voting and paid to oracles and owner afterwards": "Total funds locked during the voting and paid to oracles and owner afterwards", + "Min reward per oracle: {{amount}}": "Min reward per oracle: {{amount}}", + "% of the Total funds you receive": "% of the Total funds you receive", + "Paid to owner: {{amount}}": "Paid to owner: {{amount}}" } diff --git a/renderer/pages/oracles/new.js b/renderer/pages/oracles/new.js index b894810ff..246e14ff6 100644 --- a/renderer/pages/oracles/new.js +++ b/renderer/pages/oracles/new.js @@ -39,7 +39,6 @@ import { PresetFormControlOptionList, PresetFormControlOption, PresetFormControlInputBox, - PresetFormControlHelperText, } from '../../screens/oracles/components' import { votingMinBalance, @@ -49,6 +48,7 @@ import { viewVotingHref, humanError, stripOptions, + rewardPerOracle, } from '../../screens/oracles/utils' import {eitherState, toLocaleDna} from '../../shared/utils/utils' import { @@ -284,6 +284,9 @@ function NewVotingPage() { htmlFor="committeeSize" label={t('Committee size, oracles')} isInvalid={committeeSize < 1} + tooltip={t( + 'The number of randomly selected oracles allowed to vote' + )} mt={2} > @@ -357,9 +360,16 @@ function NewVotingPage() { - {t('Rewards')} + + {t('Cost of voting')} + - + { @@ -379,19 +389,48 @@ function NewVotingPage() { { + send('CHANGE', { + id, + value: (value || 0) / Math.max(1, committeeSize), + }) + }} /> - - {t('Total oracles rewards: {{amount}}', { - amount: dna(oracleReward * committeeSize), + + {t('Min reward per oracle: {{amount}}', { + amount: dna( + rewardPerOracle({fundPerOracle: oracleReward, ownerFee}) + ), nsSeparator: '!', })} - + + + + + + {t('Paid to owner: {{amount}}', { + amount: dna( + (oracleReward * committeeSize * Math.min(100, ownerFee)) / + 100 || 0 + ), + nsSeparator: '!', + })} + + + - - - - diff --git a/renderer/screens/oracles/utils.js b/renderer/screens/oracles/utils.js index a73ce666c..e72dd01ee 100644 --- a/renderer/screens/oracles/utils.js +++ b/renderer/screens/oracles/utils.js @@ -301,6 +301,10 @@ export function quorumVotesCount({quorum, committeeSize}) { return Math.ceil((committeeSize * quorum) / 100) } +export function rewardPerOracle({fundPerOracle, ownerFee}) { + return (fundPerOracle * (100 - Math.min(100, ownerFee))) / 100 || 0 +} + export function winnerVotesCount({winnerThreshold, votesCount}) { return Math.ceil((votesCount * winnerThreshold) / 100) }