diff --git a/packages/yoroi-extension/app/components/wallet/voting/Voting.js b/packages/yoroi-extension/app/components/wallet/voting/Voting.js index 520308b043..8a21d17352 100644 --- a/packages/yoroi-extension/app/components/wallet/voting/Voting.js +++ b/packages/yoroi-extension/app/components/wallet/voting/Voting.js @@ -17,7 +17,7 @@ import styles from './Voting.scss'; const messages = defineMessages({ lineTitle: { id: 'wallet.voting.lineTitle', - defaultMessage: '!!!Register to vote on Fund 3', + defaultMessage: '!!!Register to vote on Fund {round}', }, line2: { id: 'wallet.voting.line2', @@ -46,6 +46,7 @@ type Props = {| +onExternalLinkClick: MouseEvent => void, +hasAnyPending: boolean, +isDelegated: boolean, + +round: number, |}; @observer @@ -57,6 +58,8 @@ export default class Voting extends Component { render(): Node { const { intl } = this.context; + const round = this.props.round; + const pendingTxWarningComponent = this.props.hasAnyPending ? (
@@ -76,7 +79,7 @@ export default class Voting extends Component { {pendingTxWarningComponent}
- {intl.formatMessage(messages.lineTitle)} + {intl.formatMessage(messages.lineTitle, { round })}
diff --git a/packages/yoroi-extension/app/config/numbersConfig.js b/packages/yoroi-extension/app/config/numbersConfig.js index 3844382b24..c5b1515a1d 100644 --- a/packages/yoroi-extension/app/config/numbersConfig.js +++ b/packages/yoroi-extension/app/config/numbersConfig.js @@ -44,5 +44,7 @@ export const CARDANO_STABLE_SIZE = 2160; */ export const ERGO_STABLE_SIZE = Number.MAX_SAFE_INTEGER / 2; -// Catalyst fund 3 requires > 2950 ADA to participate +// Catalyst fund 4 *technically* requires > 450 ADA to participate +// However, the official min amount is 500 ADA export const CATALYST_MIN_AMOUNT: BigNumber = new BigNumber(450 * 1_000_000); +export const CATALYST_DISPLAYED_MIN_AMOUNT: BigNumber = new BigNumber(500 * 1_000_000); diff --git a/packages/yoroi-extension/app/containers/wallet/voting/VotingPage.js b/packages/yoroi-extension/app/containers/wallet/voting/VotingPage.js index 9a184d1f74..dd8a3bb22a 100644 --- a/packages/yoroi-extension/app/containers/wallet/voting/VotingPage.js +++ b/packages/yoroi-extension/app/containers/wallet/voting/VotingPage.js @@ -15,7 +15,7 @@ import UnsupportedWallet from '../UnsupportedWallet'; import { PublicDeriver } from '../../../api/ada/lib/storage/models/PublicDeriver/index'; import LoadingSpinner from '../../../components/widgets/LoadingSpinner'; import VerticallyCenteredLayout from '../../../components/layout/VerticallyCenteredLayout'; -import { CATALYST_MIN_AMOUNT } from '../../../config/numbersConfig'; +import { CATALYST_MIN_AMOUNT, CATALYST_DISPLAYED_MIN_AMOUNT } from '../../../config/numbersConfig'; import InsufficientFundsPage from './InsufficientFundsPage'; import { getTokenName, genLookupOrFail } from '../../../stores/stateless/tokenHelpers'; import type { TokenInfoMap } from '../../../stores/toplevel/TokenInfoStore'; @@ -131,7 +131,9 @@ export default class VotingPage extends Component { currentBalance={ balance.getDefaultEntry().amount.shiftedBy(-tokenInfo.Metadata.numberOfDecimals) } - requiredBalance={CATALYST_MIN_AMOUNT.shiftedBy(-tokenInfo.Metadata.numberOfDecimals)} + requiredBalance={ + CATALYST_DISPLAYED_MIN_AMOUNT.shiftedBy(-tokenInfo.Metadata.numberOfDecimals) + } tokenName={getTokenName(tokenInfo)} />; } @@ -152,6 +154,7 @@ export default class VotingPage extends Component { hasAnyPending={this.generated.hasAnyPending} onExternalLinkClick={handleExternalLinkClick} isDelegated={this.isDelegated === true} + round={roundInfo.nextRound} />
); diff --git a/packages/yoroi-extension/app/i18n/locales/en-US.json b/packages/yoroi-extension/app/i18n/locales/en-US.json index fbdee6b9d1..e0912fdf5d 100644 --- a/packages/yoroi-extension/app/i18n/locales/en-US.json +++ b/packages/yoroi-extension/app/i18n/locales/en-US.json @@ -783,7 +783,7 @@ "wallet.voting.line2": "Before you begin, make sure to complete steps below", "wallet.voting.line3": "Download the Catalyst Voting App.", "wallet.voting.line4": "Open the Catalyst Voting App and click on the Complete registration button.", - "wallet.voting.lineTitle": "Register to vote on Fund 3", + "wallet.voting.lineTitle": "Register to vote on Fund { round }", "wallet.voting.notDelegated": "You have not delegated. Your voting power is how much you delegate and the voting rewards will be distributed to your delegation reward address. Please make sure to delegate before voting.", "wallet.withdrawal.transaction.unregister": "This transaction will unregister one or more staking keys, giving you back your {refundAmount} {ticker} from your deposit", "widgets.copyableaddress.addressCopyTooltipMessage": "Copy to clipboard", diff --git a/packages/yoroi-extension/package-lock.json b/packages/yoroi-extension/package-lock.json index dbefd2d366..c2fec7607b 100644 --- a/packages/yoroi-extension/package-lock.json +++ b/packages/yoroi-extension/package-lock.json @@ -4490,7 +4490,7 @@ "resolved": "https://registry.npmjs.org/@emurgo/ledger-connect-handler/-/ledger-connect-handler-4.7.0.tgz", "integrity": "sha512-qI326TOFqnaJ+vO8O8G+vAEkTFWsw/sS4zplZnUjM62pHDlCi47mMipcmd5a5aN5fBQ70X6s+8jLm6oaD3to4A==", "requires": { - "@cardano-foundation/ledgerjs-hw-app-cardano": "git+https://github.com/SebastienGllmt/ledgerjs-hw-app-cardano.git" + "@cardano-foundation/ledgerjs-hw-app-cardano": "git+https://github.com/SebastienGllmt/ledgerjs-hw-app-cardano.git#5f660ceb4ab5d579b603a1c8f3c24d748582a473" } }, "@eslint/eslintrc": {