Skip to content

Commit 624d60a

Browse files
author
Marcin Mazurek
committed
Merge branch 'feat/ddw-809-implement-analytics-part-3' into feat/ddw-809-implement-analytics-remaining-tracking
2 parents 24254f4 + e2712fc commit 624d60a

File tree

8 files changed

+62
-33
lines changed

8 files changed

+62
-33
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# Changelog
22

3-
## vNext
3+
## 5.0.0
44

55
### Features
66

77
- Added new Mnemonic input component ([PR 2979](https://github.com/input-output-hk/daedalus/pull/2979))
88

99
### Fixes
1010

11+
- Fixed blank screen when opening ITN rewards ([PR 3030](https://github.com/input-output-hk/daedalus/pull/3030))
1112
- Ensured non-recommended decimal place setting alert is correctly shown ([PR 3007](https://github.com/input-output-hk/daedalus/pull/3007))
1213
- Disabled the possibility to choose a syncing wallet for ITN rewards and delegation ([PR 3015](https://github.com/input-output-hk/daedalus/pull/3015))
1314

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "daedalus",
33
"productName": "Daedalus",
4-
"version": "4.12.0",
4+
"version": "5.0.0",
55
"description": "Cryptocurrency Wallet",
66
"main": "./dist/main/index.js",
77
"scripts": {
@@ -62,8 +62,9 @@
6262
"clear:translations": "rimraf ./translations/messages",
6363
"nix:mainnet": "./nix/yarn-nix-shell.sh mainnet mainnet",
6464
"nix:flight": "./nix/yarn-nix-shell.sh mainnet mainnet_flight",
65+
"nix:preview": "./nix/yarn-nix-shell.sh preview preview",
66+
"nix:preprod": "./nix/yarn-nix-shell.sh preprod preprod",
6567
"nix:selfnode": "./nix/yarn-nix-shell.sh selfnode selfnode",
66-
"nix:testnet": "./nix/yarn-nix-shell.sh testnet testnet",
6768
"byron:wallet:importer": "yarn node-swc utils/api-importer/byron-wallet-importer.ts",
6869
"shelley:wallet:importer": "yarn node-swc utils/api-importer/shelley-wallet-importer.ts",
6970
"mary:wallet:importer": "yarn node-swc utils/api-importer/mary-wallet-importer.ts",

source/renderer/app/components/staking/redeem-itn-rewards/Step1ConfigurationDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ class Step1ConfigurationDialog extends Component<Props, State> {
358358
<div className={styles.recoveryPhrase}>
359359
<MnemonicInput
360360
{...mnemonicInputProps}
361-
label={intl.formatMessage(messages.recoveryPhraseInputLabel)}
361+
label={intl.formatMessage(messages.recoveryPhraseInputHint)}
362362
availableWords={suggestedMnemonics}
363363
wordCount={ITN_WALLET_RECOVERY_PHRASE_WORD_COUNT}
364364
error={recoveryPhraseField.error}

source/renderer/app/components/widgets/DialogFullSizeOverride.scss

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
.SimpleInput_input:not(.SimpleInput_disabled),
2323
.SimpleInput_input:focus:not(.SimpleInput_disabled),
2424
.SimpleInput_input:hover:not(.SimpleInput_disabled),
25-
.SimpleLink_root {
25+
.SimpleLink_root,
26+
.MnemonicInput_content {
2627
background-color: transparent !important;
2728
}
2829

@@ -94,7 +95,10 @@
9495
.SimpleInput_input,
9596
.SimpleInput_input::placeholder,
9697
.SimpleInput_input:focus,
97-
.SimpleInput_input:hover {
98+
.SimpleInput_input:hover,
99+
.MnemonicInput_headerSlot,
100+
.MnemonicAutocompleteLayout_inputLabel,
101+
.MnemonicAutocompleteLayout_root {
98102
color: var(--theme-dialog-fullsize-text-color);
99103
}
100104

@@ -112,7 +116,8 @@
112116
.SimpleInput_input:not(.SimpleInput_disabled),
113117
.SimpleInput_input:focus:not(.SimpleInput_errored),
114118
.SimpleInput_input:hover:not(.SimpleInput_errored),
115-
.SimpleOptions_option:after {
119+
.SimpleOptions_option:after,
120+
.MnemonicAutocompleteLayout_input {
116121
background-color: transparent !important;
117122
border-color: var(--theme-dialog-fullsize-text-color) !important;
118123
}

source/renderer/app/containers/voting/dialogs/VotingRegistrationDialogContainer.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,11 @@ class VotingRegistrationDialogContainer extends Component<Props, State> {
255255
const { calculateTransactionFee } = transactions;
256256
const { getAddressesByWalletId } = addresses;
257257
const { getWalletById } = wallets;
258-
const { selectCoins, initiateTransaction } = hardwareWallets;
258+
const {
259+
selectCoins,
260+
initiateTransaction,
261+
updateTxSignRequest,
262+
} = hardwareWallets;
259263
const { prepareVotingData } = voting;
260264
const amount = formattedAmountToLovelace(
261265
`${VOTING_REGISTRATION_FEE_CALCULATION_AMOUNT}`
@@ -276,12 +280,15 @@ class VotingRegistrationDialogContainer extends Component<Props, State> {
276280
votingData = await prepareVotingData({
277281
walletId: this.selectedWalletId,
278282
});
279-
({ fee } = await selectCoins({
283+
const coinSelection = await selectCoins({
280284
walletId: this.selectedWalletId,
281285
address: address.id,
282286
amount,
283287
metadata: votingData.metadata,
284-
}));
288+
});
289+
290+
updateTxSignRequest(coinSelection);
291+
fee = coinSelection.fee;
285292
} else {
286293
({ fee } = await calculateTransactionFee({
287294
walletId: this.selectedWalletId,

source/renderer/app/i18n/locales/ja-JP.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@
175175
"environment.network.alonzo_purple": "Alonzo Purple",
176176
"environment.network.development": "開発",
177177
"environment.network.mainnet": "メインネット",
178-
"environment.network.preprod": "Pre-Prod",
179-
"environment.network.preview": "Preview",
178+
"environment.network.preprod": "プリプロ",
179+
"environment.network.preview": "プレビュー",
180180
"environment.network.selfnode": "Selfnode",
181181
"environment.network.shelley_qa": "Shelley QA",
182182
"environment.network.staging": "ステージング",
@@ -700,8 +700,8 @@
700700
"test.environment.daedalusFlightLabel": "Cardano Mainnet - Daedalus Flight",
701701
"test.environment.developmentLabel": "開発",
702702
"test.environment.mainnetLabel": "メインネット",
703-
"test.environment.preprodLabel": "Pre-Prod",
704-
"test.environment.previewLabel": "Preview",
703+
"test.environment.preprodLabel": "プリプロ",
704+
"test.environment.previewLabel": "プレビュー",
705705
"test.environment.selfnodeLabel": "Selfnode",
706706
"test.environment.shelleyQaLabel": "Shelley QA",
707707
"test.environment.stagingLabel": "ステージング",

source/renderer/app/stores/VotingStore.ts

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@ import { formattedArrayBufferToHexString } from '../utils/formatters';
1111
import walletUtils from '../utils/walletUtils';
1212
import {
1313
VOTING_PHASE_CHECK_INTERVAL,
14-
VOTING_REGISTRATION_TRANSACTION_POLLING_INTERVAL,
1514
VOTING_REGISTRATION_MIN_TRANSACTION_CONFIRMATIONS,
15+
VOTING_REGISTRATION_TRANSACTION_POLLING_INTERVAL,
1616
} from '../config/votingConfig';
17-
import { votingPDFGenerator } from '../utils/votingPDFGenerator';
17+
import {
18+
votingPDFGenerator,
19+
VotingPDFGeneratorResult,
20+
} from '../utils/votingPDFGenerator';
1821
import { i18nContext } from '../utils/i18nContext';
1922
import type { PathRoleIdentityType } from '../utils/hardwareWalletUtils';
2023
import type {
@@ -425,23 +428,21 @@ export default class VotingStore extends Store {
425428
const { network, isMainnet } = this.environment;
426429
const intl = i18nContext(currentLocale);
427430

428-
try {
429-
await votingPDFGenerator({
430-
nextVotingFundNumber,
431-
qrCode,
432-
walletName,
433-
currentLocale,
434-
currentDateFormat,
435-
currentTimeFormat,
436-
desktopDirectoryPath,
437-
network,
438-
isMainnet,
439-
intl,
440-
});
441-
// @ts-ignore ts-migrate(2554) FIXME: Expected 1 arguments, but got 0.
431+
const result = await votingPDFGenerator({
432+
nextVotingFundNumber,
433+
qrCode,
434+
walletName,
435+
currentLocale,
436+
currentDateFormat,
437+
currentTimeFormat,
438+
desktopDirectoryPath,
439+
network,
440+
isMainnet,
441+
intl,
442+
});
443+
444+
if (result === VotingPDFGeneratorResult.FileSaved) {
442445
this.actions.voting.saveAsPDFSuccess.trigger();
443-
} catch (error) {
444-
throw new Error(error);
445446
}
446447
};
447448
_checkVotingRegistrationTransaction = async () => {

source/renderer/app/utils/votingPDFGenerator.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const messages = defineMessages({
3434
description: 'PDF author',
3535
},
3636
});
37+
3738
type Params = {
3839
nextVotingFundNumber: number;
3940
qrCode: string;
@@ -46,6 +47,12 @@ type Params = {
4647
isMainnet: boolean;
4748
intl: Record<string, any>;
4849
};
50+
51+
export enum VotingPDFGeneratorResult {
52+
FileSaved = 'FileSaved',
53+
CancelledByUser = 'CancelledByUser',
54+
}
55+
4956
export const votingPDFGenerator = async ({
5057
nextVotingFundNumber,
5158
qrCode,
@@ -57,7 +64,7 @@ export const votingPDFGenerator = async ({
5764
network,
5865
isMainnet,
5966
intl,
60-
}: Params) => {
67+
}: Params): Promise<VotingPDFGeneratorResult> => {
6168
// Consolidate data
6269
const title = intl.formatMessage(messages.title, {
6370
nextVotingFundNumber,
@@ -93,6 +100,11 @@ export const votingPDFGenerator = async ({
93100
};
94101
const dialogPath = await showSaveDialogChannel.send(params);
95102
const filePath = dialogPath.filePath || '';
103+
104+
if (dialogPath.canceled || !filePath) {
105+
return VotingPDFGeneratorResult.CancelledByUser;
106+
}
107+
96108
await generateVotingPDFChannel.send({
97109
title,
98110
currentLocale,
@@ -106,4 +118,6 @@ export const votingPDFGenerator = async ({
106118
filePath,
107119
author,
108120
});
121+
122+
return VotingPDFGeneratorResult.FileSaved;
109123
};

0 commit comments

Comments
 (0)