diff --git a/CHANGELOG.md b/CHANGELOG.md index 22698dc0d0..dd5a3bad31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ### Chores +- Added support of CIP-129 for DRep IDs ([PR 3271](https://github.com/input-output-hk/daedalus/pull/3271)) + - Update `cardano-node` to 10.1.4, and `cardano-wallet` to v2025-01-09 ([PR 3270](https://github.com/input-output-hk/daedalus/pull/3270)) ## 7.0.2 diff --git a/source/renderer/app/components/voting/voting-governance/VotingPowerDelegation.messages.ts b/source/renderer/app/components/voting/voting-governance/VotingPowerDelegation.messages.ts index f03f6a2408..63a4ada8c9 100644 --- a/source/renderer/app/components/voting/voting-governance/VotingPowerDelegation.messages.ts +++ b/source/renderer/app/components/voting/voting-governance/VotingPowerDelegation.messages.ts @@ -4,12 +4,12 @@ export const messages = defineMessages({ drepInputLabel: { id: 'voting.governance.drepInputLabel', defaultMessage: - '!!!Please type or paste a valid DRep ID (CIP-105) here. Look up {drepDirectoryLink}', + '!!!Please type or paste a valid DRep ID here. Look up {drepDirectoryLink}', description: 'Label for DRep input on the governance page', }, drepInputLabelPreprod: { id: 'voting.governance.drepInputLabelPreprod', - defaultMessage: '!!!Please type or paste a valid DRep ID (CIP-105) here.', + defaultMessage: '!!!Please type or paste a valid DRep ID here.', description: 'Label for DRep input on the governance page for preprod', }, drepInputLabelLinkText: { diff --git a/source/renderer/app/components/voting/voting-governance/VotingPowerDelegation.tsx b/source/renderer/app/components/voting/voting-governance/VotingPowerDelegation.tsx index be81baca39..1e1d3f6345 100644 --- a/source/renderer/app/components/voting/voting-governance/VotingPowerDelegation.tsx +++ b/source/renderer/app/components/voting/voting-governance/VotingPowerDelegation.tsx @@ -72,13 +72,6 @@ type StateConfirmation = Omit & { type State = Form | FormWithError | StateFormComplete | StateConfirmation; -// TODO discuss if we need to restrict the length -const isDrepIdValid = (drepId: string) => { - const isDRepId = (value: string): value is Cardano.DRepID => - Cardano.DRepID.isValid(value); - return isDRepId(drepId) && Cardano.DRepID.toCip105DRepID(drepId) === drepId; -}; - const mapOfTxErrorCodeToIntl: Record< InitializeVPDelegationTxError, typeof messages[keyof typeof messages] @@ -110,7 +103,7 @@ function VotingPowerDelegation({ }: Props) { const [state, setState] = useState(initialState); - const drepInputIsValid = isDrepIdValid(state.drepInputState.value); + const drepInputIsValid = Cardano.DRepID.isValid(state.drepInputState.value); const formIsValid = !!state.selectedWallet && diff --git a/source/renderer/app/i18n/locales/defaultMessages.json b/source/renderer/app/i18n/locales/defaultMessages.json index e49aa0f711..a631f8f3be 100644 --- a/source/renderer/app/i18n/locales/defaultMessages.json +++ b/source/renderer/app/i18n/locales/defaultMessages.json @@ -4407,12 +4407,12 @@ { "descriptors": [ { - "defaultMessage": "!!!Please type or paste a valid DRep ID (CIP-105) here. Look up {drepDirectoryLink}", + "defaultMessage": "!!!Please type or paste a valid DRep ID here. Look up {drepDirectoryLink}", "description": "Label for DRep input on the governance page", "id": "voting.governance.drepInputLabel" }, { - "defaultMessage": "!!!Please type or paste a valid DRep ID (CIP-105) here.", + "defaultMessage": "!!!Please type or paste a valid DRep ID here.", "description": "Label for DRep input on the governance page for preprod", "id": "voting.governance.drepInputLabelPreprod" }, diff --git a/source/renderer/app/i18n/locales/en-US.json b/source/renderer/app/i18n/locales/en-US.json index a3d1e6557c..e1cce304b2 100755 --- a/source/renderer/app/i18n/locales/en-US.json +++ b/source/renderer/app/i18n/locales/en-US.json @@ -729,11 +729,11 @@ "voting.governance.confirmationDialog.vote": "Vote", "voting.governance.delegateToDRep": "Delegate to DRep (default)", "voting.governance.drepInputError": "Invalid DRep ID", - "voting.governance.drepInputLabel": "Please type or paste a valid DRep ID (CIP-105) here. Look up {drepDirectoryLink}", + "voting.governance.drepInputLabel": "Please type or paste a valid DRep ID here. Look up {drepDirectoryLink}", "voting.governance.drepInputLabelLinkText": "DRep directory", "voting.governance.drepInputLabelLinkUrl": "https://gov.tools/drep_directory", "voting.governance.drepInputLabelLinkUrlPreview": "https://preview.gov.tools/drep_directory", - "voting.governance.drepInputLabelPreprod": "Please type or paste a valid DRep ID (CIP-105) here.", + "voting.governance.drepInputLabelPreprod": "Please type or paste a valid DRep ID here.", "voting.governance.drepInputPlaceholder": "Paste DRep ID here …", "voting.governance.heading": "CARDANO VOTING POWER DELEGATION", "voting.governance.initializeTxError.generic": "Something went wrong during transaction initialization. Please try again in a few minutes. ", diff --git a/source/renderer/app/i18n/locales/ja-JP.json b/source/renderer/app/i18n/locales/ja-JP.json index 76ff0a5d43..294c1d8eae 100755 --- a/source/renderer/app/i18n/locales/ja-JP.json +++ b/source/renderer/app/i18n/locales/ja-JP.json @@ -729,11 +729,11 @@ "voting.governance.confirmationDialog.vote": "投票", "voting.governance.delegateToDRep": "DRepに委任(初期設定)", "voting.governance.drepInputError": "無効なDRep IDです", - "voting.governance.drepInputLabel": "有効なDRep ID (CIP-105)を入力するか貼り付けます。{drepDirectoryLink}で検索する", + "voting.governance.drepInputLabel": "有効なDRep ID を入力するか貼り付けます。{drepDirectoryLink}で検索する", "voting.governance.drepInputLabelLinkText": "DRepディレクトリ", "voting.governance.drepInputLabelLinkUrl": "https://gov.tools/drep_directory", "voting.governance.drepInputLabelLinkUrlPreview": "https://preview.gov.tools/drep_directory", - "voting.governance.drepInputLabelPreprod": "有効なDRep ID (CIP-105)を入力するか貼り付けます。", + "voting.governance.drepInputLabelPreprod": "有効なDRep ID を入力するか貼り付けます。", "voting.governance.drepInputPlaceholder": "DRep IDを追加してください", "voting.governance.heading": "Cardano投票権の委任", "voting.governance.initializeTxError.generic": "トランザクションの初期化中に問題が発生しました。しばらくしてからもう一度お試しください。", diff --git a/translations/messages.json b/translations/messages.json index 5134001546..f1c7ea1bdf 100644 --- a/translations/messages.json +++ b/translations/messages.json @@ -4407,12 +4407,12 @@ { "descriptors": [ { - "defaultMessage": "!!!Please type or paste a valid DRep ID (CIP-105) here. Look up {drepDirectoryLink}", + "defaultMessage": "!!!Please type or paste a valid DRep ID here. Look up {drepDirectoryLink}", "description": "Label for DRep input on the governance page", "id": "voting.governance.drepInputLabel" }, { - "defaultMessage": "!!!Please type or paste a valid DRep ID (CIP-105) here.", + "defaultMessage": "!!!Please type or paste a valid DRep ID here.", "description": "Label for DRep input on the governance page for preprod", "id": "voting.governance.drepInputLabelPreprod" },