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 98e9ffe430..38e5a32fd2 100644 --- a/source/renderer/app/components/voting/voting-governance/VotingPowerDelegation.messages.ts +++ b/source/renderer/app/components/voting/voting-governance/VotingPowerDelegation.messages.ts @@ -87,4 +87,9 @@ export const messages = defineMessages({ defaultMessage: '!!!Chosen same value as previously', description: 'Chosen same value as previously', }, + initializeNotEnoughMoney: { + id: 'voting.governance.initializeTxError.notEnoughMoney', + defaultMessage: '!!!Not enough funds', + description: 'Governance voting error when wallet has not enough funds', + }, }); diff --git a/source/renderer/app/components/voting/voting-governance/VotingPowerDelegation.tsx b/source/renderer/app/components/voting/voting-governance/VotingPowerDelegation.tsx index dc3a8e1c94..f70c77b3b8 100644 --- a/source/renderer/app/components/voting/voting-governance/VotingPowerDelegation.tsx +++ b/source/renderer/app/components/voting/voting-governance/VotingPowerDelegation.tsx @@ -89,6 +89,8 @@ const mapOfTxErrorCodeToIntl: Record< > = { generic: messages.initializeTxErrorGeneric, same_vote: messages.initializeTxErrorSameVote, + no_utxos_available: messages.initializeNotEnoughMoney, + not_enough_money: messages.initializeNotEnoughMoney, }; function VotingPowerDelegation({ diff --git a/source/renderer/app/i18n/locales/defaultMessages.json b/source/renderer/app/i18n/locales/defaultMessages.json index f43257175e..3760d4693e 100644 --- a/source/renderer/app/i18n/locales/defaultMessages.json +++ b/source/renderer/app/i18n/locales/defaultMessages.json @@ -4470,6 +4470,11 @@ "defaultMessage": "!!!Chosen same value as previously", "description": "Chosen same value as previously", "id": "voting.governance.initializeTxError.sameVote" + }, + { + "defaultMessage": "!!!Not enough funds", + "description": "Governance voting error when wallet has not enough funds", + "id": "voting.governance.initializeTxError.notEnoughMoney" } ], "path": "source/renderer/app/components/voting/voting-governance/VotingPowerDelegation.messages.ts" diff --git a/source/renderer/app/i18n/locales/en-US.json b/source/renderer/app/i18n/locales/en-US.json index 6a462c09e9..8cec9fcf0a 100755 --- a/source/renderer/app/i18n/locales/en-US.json +++ b/source/renderer/app/i18n/locales/en-US.json @@ -733,6 +733,7 @@ "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. ", + "voting.governance.initializeTxError.notEnoughMoney": "This wallet does not contain the minimum required amount of 1 ADA. The wallet might still be syncing. Please choose another wallet to vote.", "voting.governance.initializeTxError.sameVote": "This voting power delegation choice has already been successfully recorded in a previous transaction. Please change the registration type or DRep ID in order to proceed.", "voting.governance.learnMoreLinkLabel": "Cardano Governance.", "voting.governance.noConfidence": "No Confidence", diff --git a/source/renderer/app/i18n/locales/ja-JP.json b/source/renderer/app/i18n/locales/ja-JP.json index aa85bb822d..101602d74a 100755 --- a/source/renderer/app/i18n/locales/ja-JP.json +++ b/source/renderer/app/i18n/locales/ja-JP.json @@ -733,6 +733,7 @@ "voting.governance.drepInputPlaceholder": "!!!Paste DRep ID here …", "voting.governance.heading": "!!!CARDANO VOTING POWER DELEGATION", "voting.governance.initializeTxError.generic": "!!!Could not initialize transaction. Please try again!", + "voting.governance.initializeTxError.notEnoughMoney": "!!!Not enough funds", "voting.governance.initializeTxError.sameVote": "!!!Chosen same value as previously", "voting.governance.learnMoreLinkLabel": "!!!Governance link label", "voting.governance.noConfidence": "!!!No Confidence", diff --git a/source/renderer/app/stores/VotingStore.ts b/source/renderer/app/stores/VotingStore.ts index ba7348314e..1dfbd562f0 100644 --- a/source/renderer/app/stores/VotingStore.ts +++ b/source/renderer/app/stores/VotingStore.ts @@ -58,7 +58,11 @@ type GenericErrorCode = 'generic'; export type InitializeVPDelegationTxError = | GenericErrorCode | typeof expectedInitializeVPDelegationTxErrors[number]; -export const expectedInitializeVPDelegationTxErrors = ['same_vote'] as const; +export const expectedInitializeVPDelegationTxErrors = [ + 'same_vote', + 'no_utxos_available', + 'not_enough_money', +] as const; export type DelegateVotesError = | GenericErrorCode diff --git a/translations/messages.json b/translations/messages.json index e6ff96b2a4..61cf49d645 100644 --- a/translations/messages.json +++ b/translations/messages.json @@ -4470,6 +4470,11 @@ "defaultMessage": "!!!Chosen same value as previously", "description": "Chosen same value as previously", "id": "voting.governance.initializeTxError.sameVote" + }, + { + "defaultMessage": "!!!Not enough funds", + "description": "Governance voting error when wallet has not enough funds", + "id": "voting.governance.initializeTxError.notEnoughMoney" } ], "path": "source/renderer/app/components/voting/voting-governance/VotingPowerDelegation.messages.ts"