diff --git a/CHANGELOG.md b/CHANGELOG.md index fe01dbe180..99979b5b0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## vNext +## 5.0.0 ### Features @@ -8,6 +8,7 @@ ### Fixes +- Fixed blank screen when opening ITN rewards ([PR 3030](https://github.com/input-output-hk/daedalus/pull/3030)) - Ensured non-recommended decimal place setting alert is correctly shown ([PR 3007](https://github.com/input-output-hk/daedalus/pull/3007)) - Disabled the possibility to choose a syncing wallet for ITN rewards and delegation ([PR 3015](https://github.com/input-output-hk/daedalus/pull/3015)) diff --git a/package.json b/package.json index 25a87d7835..73cc613d38 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "daedalus", "productName": "Daedalus", - "version": "4.12.0", + "version": "5.0.0", "description": "Cryptocurrency Wallet", "main": "./dist/main/index.js", "scripts": { @@ -62,8 +62,9 @@ "clear:translations": "rimraf ./translations/messages", "nix:mainnet": "./nix/yarn-nix-shell.sh mainnet mainnet", "nix:flight": "./nix/yarn-nix-shell.sh mainnet mainnet_flight", + "nix:preview": "./nix/yarn-nix-shell.sh preview preview", + "nix:preprod": "./nix/yarn-nix-shell.sh preprod preprod", "nix:selfnode": "./nix/yarn-nix-shell.sh selfnode selfnode", - "nix:testnet": "./nix/yarn-nix-shell.sh testnet testnet", "byron:wallet:importer": "yarn node-swc utils/api-importer/byron-wallet-importer.ts", "shelley:wallet:importer": "yarn node-swc utils/api-importer/shelley-wallet-importer.ts", "mary:wallet:importer": "yarn node-swc utils/api-importer/mary-wallet-importer.ts", diff --git a/source/renderer/app/components/staking/redeem-itn-rewards/Step1ConfigurationDialog.tsx b/source/renderer/app/components/staking/redeem-itn-rewards/Step1ConfigurationDialog.tsx index cc5c243f1b..fe1a1b7a22 100644 --- a/source/renderer/app/components/staking/redeem-itn-rewards/Step1ConfigurationDialog.tsx +++ b/source/renderer/app/components/staking/redeem-itn-rewards/Step1ConfigurationDialog.tsx @@ -358,7 +358,7 @@ class Step1ConfigurationDialog extends Component {
{ const { calculateTransactionFee } = transactions; const { getAddressesByWalletId } = addresses; const { getWalletById } = wallets; - const { selectCoins, initiateTransaction } = hardwareWallets; + const { + selectCoins, + initiateTransaction, + updateTxSignRequest, + } = hardwareWallets; const { prepareVotingData } = voting; const amount = formattedAmountToLovelace( `${VOTING_REGISTRATION_FEE_CALCULATION_AMOUNT}` @@ -276,12 +280,15 @@ class VotingRegistrationDialogContainer extends Component { votingData = await prepareVotingData({ walletId: this.selectedWalletId, }); - ({ fee } = await selectCoins({ + const coinSelection = await selectCoins({ walletId: this.selectedWalletId, address: address.id, amount, metadata: votingData.metadata, - })); + }); + + updateTxSignRequest(coinSelection); + fee = coinSelection.fee; } else { ({ fee } = await calculateTransactionFee({ walletId: this.selectedWalletId, diff --git a/source/renderer/app/i18n/locales/ja-JP.json b/source/renderer/app/i18n/locales/ja-JP.json index 142635f65e..173dca13a1 100755 --- a/source/renderer/app/i18n/locales/ja-JP.json +++ b/source/renderer/app/i18n/locales/ja-JP.json @@ -174,8 +174,8 @@ "environment.network.alonzo_purple": "Alonzo Purple", "environment.network.development": "開発", "environment.network.mainnet": "メインネット", - "environment.network.preprod": "Pre-Prod", - "environment.network.preview": "Preview", + "environment.network.preprod": "プリプロ", + "environment.network.preview": "プレビュー", "environment.network.selfnode": "Selfnode", "environment.network.shelley_qa": "Shelley QA", "environment.network.staging": "ステージング", @@ -699,8 +699,8 @@ "test.environment.daedalusFlightLabel": "Cardano Mainnet - Daedalus Flight", "test.environment.developmentLabel": "開発", "test.environment.mainnetLabel": "メインネット", - "test.environment.preprodLabel": "Pre-Prod", - "test.environment.previewLabel": "Preview", + "test.environment.preprodLabel": "プリプロ", + "test.environment.previewLabel": "プレビュー", "test.environment.selfnodeLabel": "Selfnode", "test.environment.shelleyQaLabel": "Shelley QA", "test.environment.stagingLabel": "ステージング", diff --git a/source/renderer/app/stores/VotingStore.ts b/source/renderer/app/stores/VotingStore.ts index 5ab01a9511..fcbb497998 100644 --- a/source/renderer/app/stores/VotingStore.ts +++ b/source/renderer/app/stores/VotingStore.ts @@ -11,10 +11,13 @@ import { formattedArrayBufferToHexString } from '../utils/formatters'; import walletUtils from '../utils/walletUtils'; import { VOTING_PHASE_CHECK_INTERVAL, - VOTING_REGISTRATION_TRANSACTION_POLLING_INTERVAL, VOTING_REGISTRATION_MIN_TRANSACTION_CONFIRMATIONS, + VOTING_REGISTRATION_TRANSACTION_POLLING_INTERVAL, } from '../config/votingConfig'; -import { votingPDFGenerator } from '../utils/votingPDFGenerator'; +import { + votingPDFGenerator, + VotingPDFGeneratorResult, +} from '../utils/votingPDFGenerator'; import { i18nContext } from '../utils/i18nContext'; import type { PathRoleIdentityType } from '../utils/hardwareWalletUtils'; import type { @@ -423,23 +426,21 @@ export default class VotingStore extends Store { const { network, isMainnet } = this.environment; const intl = i18nContext(currentLocale); - try { - await votingPDFGenerator({ - nextVotingFundNumber, - qrCode, - walletName, - currentLocale, - currentDateFormat, - currentTimeFormat, - desktopDirectoryPath, - network, - isMainnet, - intl, - }); - // @ts-ignore ts-migrate(2554) FIXME: Expected 1 arguments, but got 0. + const result = await votingPDFGenerator({ + nextVotingFundNumber, + qrCode, + walletName, + currentLocale, + currentDateFormat, + currentTimeFormat, + desktopDirectoryPath, + network, + isMainnet, + intl, + }); + + if (result === VotingPDFGeneratorResult.FileSaved) { this.actions.voting.saveAsPDFSuccess.trigger(); - } catch (error) { - throw new Error(error); } }; _checkVotingRegistrationTransaction = async () => { diff --git a/source/renderer/app/utils/votingPDFGenerator.ts b/source/renderer/app/utils/votingPDFGenerator.ts index 0b710ba6f4..3f3c60567b 100644 --- a/source/renderer/app/utils/votingPDFGenerator.ts +++ b/source/renderer/app/utils/votingPDFGenerator.ts @@ -34,6 +34,7 @@ const messages = defineMessages({ description: 'PDF author', }, }); + type Params = { nextVotingFundNumber: number; qrCode: string; @@ -46,6 +47,12 @@ type Params = { isMainnet: boolean; intl: Record; }; + +export enum VotingPDFGeneratorResult { + FileSaved = 'FileSaved', + CancelledByUser = 'CancelledByUser', +} + export const votingPDFGenerator = async ({ nextVotingFundNumber, qrCode, @@ -57,7 +64,7 @@ export const votingPDFGenerator = async ({ network, isMainnet, intl, -}: Params) => { +}: Params): Promise => { // Consolidate data const title = intl.formatMessage(messages.title, { nextVotingFundNumber, @@ -93,6 +100,11 @@ export const votingPDFGenerator = async ({ }; const dialogPath = await showSaveDialogChannel.send(params); const filePath = dialogPath.filePath || ''; + + if (dialogPath.canceled || !filePath) { + return VotingPDFGeneratorResult.CancelledByUser; + } + await generateVotingPDFChannel.send({ title, currentLocale, @@ -106,4 +118,6 @@ export const votingPDFGenerator = async ({ filePath, author, }); + + return VotingPDFGeneratorResult.FileSaved; };