Skip to content

Commit c85e0b7

Browse files
[DDW-779] Merges-in latest develop branch and fix conflicts
2 parents d2e2197 + df6331d commit c85e0b7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+914
-625
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ mainnet-genesis-dryrun-with-stakeholders.json
8686

8787
# nix-build results
8888
result*
89+
!result*.js
90+
!result*.jsx
91+
!result*.ts
92+
!result*.tsx
8993

9094
# Npm
9195
package-lock.json

CHANGELOG.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,24 @@
22

33
## vNext
44

5-
### Chores
6-
7-
- Updated `trezor-connect` dependency to version `8.2.3` ([PR 2726](https://github.com/input-output-hk/daedalus/pull/2726))
8-
- Updated `cardano-wallet` to version `2021-11-11` ([PR 2765](https://github.com/input-output-hk/daedalus/pull/2765))
9-
- Added jest library for unit testing ([PR 2633](https://github.com/input-output-hk/daedalus/pull/2633))
10-
- Updated `cardano-launcher` to version `0.20211105.1` and added Cardano Node RTS flags which improve resource usage ([PR 2735](https://github.com/input-output-hk/daedalus/pull/2735), [PR 2741](https://github.com/input-output-hk/daedalus/pull/2741))
11-
125
### Features
136

7+
- Implement catalyst state snapshot phase ([PR 2771](https://github.com/input-output-hk/daedalus/pull/2771))
148
- Implemented "discreet mode" ([PR 2723](https://github.com/input-output-hk/daedalus/pull/2723), [PR 2724](https://github.com/input-output-hk/daedalus/pull/2724), [PR 2725](https://github.com/input-output-hk/daedalus/pull/2725), [PR 2742](https://github.com/input-output-hk/daedalus/pull/2742), [PR 2740](https://github.com/input-output-hk/daedalus/pull/2740), [PR 2756](https://github.com/input-output-hk/daedalus/pull/2756))
159
- Updated slider component to only execute onAfterChange if slider had moved ([PR 2766](https://github.com/input-output-hk/daedalus/pull/2766))
1610

1711
### Fixes
1812

1913
- Fixed app update for specific platform ([PR 2759](https://github.com/input-output-hk/daedalus/pull/2759))
14+
- Fixed checkbox tick offset ([PR 2751](https://github.com/input-output-hk/daedalus/pull/2751))
2015

21-
### Fixes
16+
### Chores
2217

23-
- Fixed checkbox tick offset ([PR 2751](https://github.com/input-output-hk/daedalus/pull/2751))
18+
- Updated `trezor-connect` dependency to version `8.2.3` ([PR 2726](https://github.com/input-output-hk/daedalus/pull/2726))
19+
- Improve startup and shutdown messages ([PR 2770](https://github.com/input-output-hk/daedalus/pull/2770))
20+
- Updated `cardano-wallet` to version `2021-11-11` ([PR 2765](https://github.com/input-output-hk/daedalus/pull/2765))
21+
- Added jest library for unit testing ([PR 2633](https://github.com/input-output-hk/daedalus/pull/2633))
22+
- Updated `cardano-launcher` to version `0.20211105.1` and added Cardano Node RTS flags which improve resource usage ([PR 2735](https://github.com/input-output-hk/daedalus/pull/2735), [PR 2741](https://github.com/input-output-hk/daedalus/pull/2741))
2423

2524
## 4.5.2
2625

source/renderer/app/components/loading/syncing-connecting/StatusIcons.scss

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,12 @@
99
z-index: 2500;
1010

1111
.icon {
12+
display: block;
1213
height: 24px;
13-
padding: 2px;
1414
width: 24px;
1515
svg {
16-
height: 20px;
17-
width: 20px;
18-
}
19-
&.icon-nodeState {
20-
padding-right: 4px;
21-
padding-top: 0;
22-
svg {
23-
height: 22px;
24-
width: 22px;
25-
}
26-
}
27-
&.icon-isNodeResponding {
28-
padding: 3.2px 0 0;
29-
svg {
30-
height: 17.6px;
31-
width: 24px;
32-
}
16+
height: 24px;
17+
width: 24px;
3318
}
3419
}
3520

source/renderer/app/components/loading/syncing-connecting/SyncingConnectingStatus.js

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @flow
22
import React, { Component } from 'react';
3-
import { defineMessages, intlShape } from 'react-intl';
3+
import { defineMessages, intlShape, FormattedHTMLMessage } from 'react-intl';
44
import classNames from 'classnames';
55
import styles from './SyncingConnectingStatus.scss';
66
import { CardanoNodeStates } from '../../../../../common/types/cardano-node.types';
@@ -12,11 +12,23 @@ const messages = defineMessages({
1212
defaultMessage: '!!!Starting Cardano node',
1313
description: 'Message "Starting Cardano node" on the loading screen.',
1414
},
15+
startingDescription: {
16+
id: 'loading.screen.startingCardanoDescription',
17+
defaultMessage:
18+
'!!!This process validates the integrity of local blockchain data and could take several minutes.',
19+
description: 'Message "Starting Cardano node" on the loading screen.',
20+
},
1521
stopping: {
1622
id: 'loading.screen.stoppingCardanoMessage',
1723
defaultMessage: '!!!Stopping Cardano node',
1824
description: 'Message "Stopping Cardano node" on the loading screen.',
1925
},
26+
stoppingDescription: {
27+
id: 'loading.screen.stoppingCardanoDescription',
28+
defaultMessage:
29+
'!!!This process updates the databases and could take several minutes.<br />To preserve data integrity, please wait until this process is complete.',
30+
description: 'Message "Stopping Cardano node" on the loading screen.',
31+
},
2032
stopped: {
2133
id: 'loading.screen.stoppedCardanoMessage',
2234
defaultMessage: '!!!Cardano node stopped',
@@ -91,24 +103,33 @@ export default class SyncingConnectingStatus extends Component<Props> {
91103
intl: intlShape.isRequired,
92104
};
93105

94-
_getConnectingMessage = () => {
106+
_getConnectingMessage = (): {
107+
connectingMessage: string,
108+
connectingDescription?: string,
109+
} => {
95110
const {
96111
cardanoNodeState,
97112
hasBeenConnected,
98113
isVerifyingBlockchain,
99114
isTlsCertInvalid,
100115
isConnected,
101116
} = this.props;
102-
if (isConnected) return messages.loadingWalletData;
103117
let connectingMessage;
118+
if (isConnected) {
119+
connectingMessage = messages.loadingWalletData;
120+
return { connectingMessage };
121+
}
122+
let connectingDescription;
104123
switch (cardanoNodeState) {
105124
case null:
106125
case CardanoNodeStates.STARTING:
107126
connectingMessage = messages.starting;
127+
connectingDescription = messages.startingDescription;
108128
break;
109129
case CardanoNodeStates.STOPPING:
110130
case CardanoNodeStates.EXITING:
111131
connectingMessage = messages.stopping;
132+
connectingDescription = messages.stoppingDescription;
112133
break;
113134
case CardanoNodeStates.STOPPED:
114135
connectingMessage = messages.stopped;
@@ -136,12 +157,12 @@ export default class SyncingConnectingStatus extends Component<Props> {
136157
connectingMessage === messages.connecting ||
137158
connectingMessage === messages.reconnecting;
138159
if (isTlsCertInvalid && isConnectingMessage) {
139-
return messages.tlsCertificateNotValidError;
140-
}
141-
if (isVerifyingBlockchain && isConnectingMessage) {
142-
return messages.verifyingBlockchain;
160+
connectingMessage = messages.tlsCertificateNotValidError;
161+
} else if (isVerifyingBlockchain && isConnectingMessage) {
162+
connectingMessage = messages.verifyingBlockchain;
163+
connectingDescription = messages.startingDescription;
143164
}
144-
return connectingMessage;
165+
return { connectingMessage, connectingDescription };
145166
};
146167

147168
render() {
@@ -170,13 +191,23 @@ export default class SyncingConnectingStatus extends Component<Props> {
170191
showEllipsis ? styles.withoutAnimation : null,
171192
]);
172193

194+
const {
195+
connectingMessage,
196+
connectingDescription,
197+
} = this._getConnectingMessage();
198+
173199
return (
174200
<div className={componentStyles}>
175201
<h1 className={headlineStyles}>
176-
{intl.formatMessage(this._getConnectingMessage(), {
202+
{intl.formatMessage(connectingMessage, {
177203
verificationProgress,
178204
})}
179205
</h1>
206+
<div className={styles.description}>
207+
{connectingDescription && (
208+
<FormattedHTMLMessage {...connectingDescription} />
209+
)}
210+
</div>
180211
</div>
181212
);
182213
}

source/renderer/app/components/loading/syncing-connecting/SyncingConnectingStatus.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@
1515
.headline {
1616
font-family: var(--font-regular);
1717
font-size: 18px;
18+
margin-bottom: 14px;
19+
}
20+
21+
.description {
22+
color: var(--theme-connecting-description-color);
23+
font-family: var(--font-regular);
24+
font-size: 16px;
25+
line-height: 22px;
26+
margin: 0 auto;
27+
max-width: 580px;
1828
}
1929

2030
.connecting {

source/renderer/app/components/staking/delegation-center/WalletRow.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,22 +82,16 @@ const messages = defineMessages({
8282
type Props = {
8383
wallet: Wallet,
8484
delegatedStakePool?: ?StakePool,
85-
numberOfStakePools: number,
8685
numberOfRankedStakePools: number,
8786
onDelegate: Function,
8887
onUndelegate: Function,
8988
getStakePoolById: Function,
9089
nextEpochNumber: number,
9190
futureEpochNumber: number,
92-
onSelect?: Function,
93-
selectedPoolId?: ?number,
94-
isListActive?: boolean,
9591
currentTheme: string,
9692
onOpenExternalLink: Function,
9793
showWithSelectButton?: boolean,
9894
containerClassName: string,
99-
setListActive?: Function,
100-
listName?: string,
10195
};
10296

10397
type WalletRowState = {
Lines changed: 19 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -1,132 +1,30 @@
11
// @flow
2-
import React, { Component } from 'react';
2+
import React from 'react';
33
import { observer } from 'mobx-react';
4-
import {
5-
defineMessages,
6-
intlShape,
7-
FormattedMessage,
8-
FormattedHTMLMessage,
9-
} from 'react-intl';
10-
import BigNumber from 'bignumber.js';
11-
import { Link } from 'react-polymorph/lib/components/Link';
4+
import { FormattedHTMLMessage } from 'react-intl';
125
import globalMessages from '../../i18n/global-messages';
136
import LoadingSpinner from '../widgets/LoadingSpinner';
14-
import {
15-
CURRENT_VOTING_FUND_NUMBER,
16-
NEXT_VOTING_FUND_NUMBER,
17-
} from '../../config/votingConfig';
187
import styles from './VotingUnavailable.scss';
19-
20-
const messages = defineMessages({
21-
heading: {
22-
id: 'voting.unavailable.heading',
23-
defaultMessage: '!!!Project Catalyst voting registration',
24-
description: 'Headline for the "Voting unavailable" screen',
25-
},
26-
paragraph1: {
27-
id: 'voting.unavailable.paragraph1',
28-
defaultMessage:
29-
'!!!Project Catalyst Fund{currentVotingFundNumber} has now ended. Fund{nextVotingFundNumber} is currently in preparation, voting registration is not available yet.',
30-
description: 'First paragraph on the "Voting unavailable" screen',
31-
},
32-
paragraph2: {
33-
id: 'voting.unavailable.paragraph2',
34-
defaultMessage:
35-
'!!!Join our {link1} and {link2} Telegram channels for the latest updates (English language only).',
36-
description: 'Second paragraph on the "Voting unavailable" screen',
37-
},
38-
link1Text: {
39-
id: 'voting.unavailable.link1Text',
40-
defaultMessage: '!!!Catalyst Announcements',
41-
description: 'First link text on the "Voting unavailable" screen',
42-
},
43-
link2Text: {
44-
id: 'voting.unavailable.link2Text',
45-
defaultMessage: '!!!Project Catalyst Chat',
46-
description: 'Second link text on the "Voting unavailable" screen',
47-
},
48-
link1Url: {
49-
id: 'voting.unavailable.link1Url',
50-
defaultMessage: '!!!https://t.me/cardanocatalyst',
51-
description: 'First link URL on the "Voting unavailable" screen',
52-
},
53-
link2Url: {
54-
id: 'voting.unavailable.link2Url',
55-
defaultMessage: '!!!https://t.me/ProjectCatalystChat',
56-
description: 'Second link URL on the "Voting unavailable" screen',
57-
},
58-
});
8+
import { formattedNumber } from '../../utils/formatters';
599

6010
type Props = {
6111
syncPercentage: number,
62-
isVotingRegistrationAvailable: boolean,
63-
onExternalLinkClick: Function,
6412
};
6513

66-
@observer
67-
export default class VotingUnavailable extends Component<Props> {
68-
static contextTypes = {
69-
intl: intlShape.isRequired,
70-
};
71-
72-
render() {
73-
const { intl } = this.context;
74-
const {
75-
syncPercentage,
76-
isVotingRegistrationAvailable,
77-
onExternalLinkClick,
78-
} = this.props;
79-
80-
const heading = intl.formatMessage(messages.heading);
81-
const paragraph1 = intl.formatMessage(messages.paragraph1, {
82-
currentFundNumber: CURRENT_VOTING_FUND_NUMBER,
83-
nextVotingFundNumber: NEXT_VOTING_FUND_NUMBER,
84-
});
85-
const link1 = (
86-
<Link
87-
className={styles.link}
88-
label={intl.formatMessage(messages.link1Text)}
89-
onClick={() =>
90-
onExternalLinkClick(intl.formatMessage(messages.link1Url))
91-
}
92-
/>
93-
);
94-
const link2 = (
95-
<Link
96-
className={styles.link}
97-
label={intl.formatMessage(messages.link2Text)}
98-
onClick={() =>
99-
onExternalLinkClick(intl.formatMessage(messages.link2Url))
100-
}
101-
/>
102-
);
103-
104-
return (
105-
<div className={styles.component}>
106-
{isVotingRegistrationAvailable ? (
107-
<>
108-
<LoadingSpinner big />
109-
<div className={styles.description}>
110-
<FormattedHTMLMessage
111-
{...globalMessages.featureUnavailableWhileSyncing}
112-
values={{
113-
syncPercentage: new BigNumber(syncPercentage).toFormat(2),
114-
}}
115-
/>
116-
</div>
117-
</>
118-
) : (
119-
<>
120-
<h1>{heading}</h1>
121-
<p>{paragraph1}</p>
122-
<FormattedMessage
123-
{...messages.paragraph2}
124-
values={{ link1, link2 }}
125-
tagName="p"
126-
/>
127-
</>
128-
)}
14+
const VotingUnavailable = ({ syncPercentage }: Props) => {
15+
return (
16+
<div className={styles.component}>
17+
<LoadingSpinner big />
18+
<div className={styles.description}>
19+
<FormattedHTMLMessage
20+
{...globalMessages.featureUnavailableWhileSyncing}
21+
values={{
22+
syncPercentage: formattedNumber(syncPercentage, 2),
23+
}}
24+
/>
12925
</div>
130-
);
131-
}
132-
}
26+
</div>
27+
);
28+
};
29+
30+
export default observer(VotingUnavailable);

0 commit comments

Comments
 (0)