Skip to content

Commit

Permalink
Merge branch 'develop' into feature/ddw-511-implement-passphrase-hand…
Browse files Browse the repository at this point in the history
…ling
  • Loading branch information
nikolaglumac committed Jan 21, 2021
2 parents 301b035 + 51d508a commit c49e054
Show file tree
Hide file tree
Showing 38 changed files with 894 additions and 387 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
@@ -1,20 +1,22 @@
Changelog
=========

## vNext
## 3.2.0-FC1

### Features

- Implement Trezor passphrase handling ([PR 2284](https://github.com/input-output-hk/daedalus/pull/2284))
- Improve Mnemonic Phrase Input UX [PR 2280](https://github.com/input-output-hk/daedalus/pull/2280)
- Added wallet public key viewing feature ([PR 2271](https://github.com/input-output-hk/daedalus/pull/2271))
- Added tile view for delegated Stake pools in Delegation Center ([PR 2275](https://github.com/input-output-hk/daedalus/pull/2275))

### Fixes

- Fixed Ledger TXs to Byron addresses ([PR 2299](https://github.com/input-output-hk/daedalus/pull/2299))

### Chores

- Updated `cardano-wallet` to version `2021-01-12` ([PR 2303](https://github.com/input-output-hk/daedalus/pull/2303))
- Improved "Settings" screen scrolling actions ([PR 2302](https://github.com/input-output-hk/daedalus/pull/2302))
- Improved scrollable dialogs ([PR 2285](https://github.com/input-output-hk/daedalus/pull/2285))
- Disabled and hid copy and paste context menu items on some scenarios ([PR 2300](https://github.com/input-output-hk/daedalus/pull/2300))
Expand Down
8 changes: 4 additions & 4 deletions nix/sources.json
Expand Up @@ -29,12 +29,12 @@
"homepage": null,
"owner": "input-output-hk",
"repo": "cardano-wallet",
"rev": "bcbed39dbe61b978453d6dee94140504bd0f6f9b",
"sha256": "00d5488yzsx3f6mqnnz9cd91zrbz2v6xqgqgcxk4vhl9qkc9vnfr",
"rev": "4e49b1f12ae7d653eca149b60d67f2a1a578104a",
"sha256": "1ypkyn2s12nxwrk1ims8vrhhyy1xl3v5y35yxrwvqp8y8m2sac2x",
"type": "tarball",
"url": "https://github.com/input-output-hk/cardano-wallet/archive/bcbed39dbe61b978453d6dee94140504bd0f6f9b.tar.gz",
"url": "https://github.com/input-output-hk/cardano-wallet/archive/4e49b1f12ae7d653eca149b60d67f2a1a578104a.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz",
"version": "v2020-12-08"
"version": "v2021-01-12"
},
"gitignore": {
"branch": "master",
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "daedalus",
"productName": "Daedalus",
"version": "3.1.0",
"version": "3.2.0-FC1",
"description": "Cryptocurrency Wallet",
"main": "./dist/main/index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions source/renderer/app/api/api.js
Expand Up @@ -1994,7 +1994,7 @@ export default class AdaApi {
blockchain_start_time, // eslint-disable-line
slot_length: slotLength,
epoch_length: epochLength,
epoch_stability: epochStability,
security_parameter: securityParameter,
active_slot_coefficient: activeSlotCoefficient,
decentralization_level: decentralizationLevel,
desired_pool_number: desiredPoolNumber,
Expand All @@ -2008,7 +2008,7 @@ export default class AdaApi {
blockchainStartTime,
slotLength,
epochLength,
epochStability,
securityParameter,
activeSlotCoefficient,
decentralizationLevel,
desiredPoolNumber,
Expand Down
6 changes: 3 additions & 3 deletions source/renderer/app/api/network/types.js
Expand Up @@ -29,7 +29,7 @@ export type EpochLength = {
unit: string,
};

export type EpochStability = {
export type SecurityParameter = {
quantity: number,
unit: string,
};
Expand Down Expand Up @@ -102,7 +102,7 @@ export type GetNetworkParametersResponse = {
blockchainStartTime: number,
slotLength: SlotLength,
epochLength: EpochLength,
epochStability: EpochStability,
securityParameter: SecurityParameter,
activeSlotCoefficient: ActiveSlotCoefficient,
decentralizationLevel: DecentralizationLevel,
desiredPoolNumber: number,
Expand All @@ -115,7 +115,7 @@ export type GetNetworkParametersApiResponse = {
blockchain_start_time: string,
slot_length: SlotLength,
epoch_length: EpochLength,
epoch_stability: EpochStability,
security_parameter: SecurityParameter,
active_slot_coefficient: ActiveSlotCoefficient,
decentralization_level: DecentralizationLevel,
desired_pool_number: number,
Expand Down
5 changes: 5 additions & 0 deletions source/renderer/app/api/transactions/requests/selectCoins.js
@@ -1,4 +1,5 @@
// @flow
import { WalletUnits } from '../../../domains/Wallet';
import type { RequestConfig } from '../../common/types';
import type { TransactionPaymentData, CoinSelectionAmount } from '../types';
import type { DelegationAction } from '../../../types/stakingTypes';
Expand Down Expand Up @@ -43,6 +44,10 @@ export type SelectCoinsResponseType = {
certificate_type: DelegationAction,
reward_account_path: Array<string>,
}>,
deposits?: Array<{
quantity: number,
unit: WalletUnits.LOVELACE,
}>,
};

export const selectCoins = (
Expand Down
12 changes: 12 additions & 0 deletions source/renderer/app/api/transactions/types.js
Expand Up @@ -22,6 +22,14 @@ export type TransactionInsertionBlock = {
export type Transaction = {
id: string,
amount: TransactionAmount,
fee: {
quantity: number,
unit: WalletUnits.LOVELACE,
},
deposit: {
quantity: number,
unit: WalletUnits.LOVELACE,
},
inserted_at?: {
time: Date,
block: TransactionInsertionBlock,
Expand Down Expand Up @@ -150,6 +158,10 @@ export type TransactionPaymentData = {
export type TransactionFee = {
estimated_min: TransactionFeeAmount,
estimated_max: TransactionFeeAmount,
deposit: {
quantity: number,
unit: WalletUnits.LOVELACE,
},
};

export type CoinSelectionAmount = {
Expand Down
8 changes: 8 additions & 0 deletions source/renderer/app/api/wallets/types.js
Expand Up @@ -271,6 +271,14 @@ export type TransferFundsResponse = {
quantity: number,
unit: WalletUnits.LOVELACE,
},
fee: {
quantity: number,
unit: WalletUnits.LOVELACE,
},
deposit: {
quantity: number,
unit: WalletUnits.LOVELACE,
},
inserted_at?: {
time: Date,
block: Block,
Expand Down
6 changes: 6 additions & 0 deletions source/renderer/app/components/staking/_stakingConfig.scss
Expand Up @@ -15,6 +15,12 @@
font-family: var(--font-semibold);
}

%accentBoldText {
@extend %baseTypography;
color: var(--theme-staking-font-color-accent);
font-family: var(--font-bold);
}

%regularText {
@extend %baseTypography;
color: var(--theme-staking-font-color-regular);
Expand Down
Expand Up @@ -13,6 +13,7 @@ import type {
type Props = {
wallets: Array<Wallet>,
numberOfStakePools: number,
numberOfRankedStakePools: number,
onDelegate: Function,
onUndelegate: Function,
networkTip: ?TipInfo,
Expand All @@ -23,6 +24,12 @@ type Props = {
isLoading: boolean,
currentLocale: string,
isEpochsInfoAvailable: boolean,
isListActive?: boolean,
currentTheme: string,
onOpenExternalLink: Function,
containerClassName: string,
setListActive?: Function,
listName?: string,
};

@observer
Expand All @@ -31,6 +38,7 @@ export default class DelegationCenter extends Component<Props> {
const {
wallets,
numberOfStakePools,
numberOfRankedStakePools,
onDelegate,
onUndelegate,
networkTip,
Expand All @@ -41,6 +49,12 @@ export default class DelegationCenter extends Component<Props> {
isLoading,
currentLocale,
isEpochsInfoAvailable,
isListActive,
currentTheme,
onOpenExternalLink,
containerClassName,
setListActive,
listName,
} = this.props;

return (
Expand All @@ -57,10 +71,19 @@ export default class DelegationCenter extends Component<Props> {
<DelegationCenterBody
wallets={wallets}
numberOfStakePools={numberOfStakePools}
numberOfRankedStakePools={numberOfRankedStakePools}
onDelegate={onDelegate}
onUndelegate={onUndelegate}
getStakePoolById={getStakePoolById}
nextEpoch={nextEpoch}
futureEpoch={futureEpoch}
isLoading={isLoading || !isEpochsInfoAvailable}
currentTheme={currentTheme}
isListActive={isListActive}
onOpenExternalLink={onOpenExternalLink}
containerClassName={containerClassName}
setListActive={setListActive}
listName={listName}
/>
</Fragment>
);
Expand Down
Expand Up @@ -3,17 +3,24 @@ import React, { Component } from 'react';
import { observer } from 'mobx-react';
import classnames from 'classnames';
import { defineMessages, intlShape } from 'react-intl';
import { get } from 'lodash';
import Wallet from '../../../domains/Wallet';
import WalletRow from './WalletRow';
import styles from './DelegationCenterBody.scss';
import LoadingSpinner from '../../widgets/LoadingSpinner';
import type { FutureEpoch, NextEpoch } from '../../../api/network/types';

const messages = defineMessages({
bodyTitle: {
id: 'staking.delegationCenter.bodyTitle',
defaultMessage: '!!!Wallets',
description: 'Title for the Delegation center body section.',
},
currentEpochTitle: {
id: 'staking.delegationCenter.currentEpochTitle',
defaultMessage: '!!!Now',
description: 'Title for the Delegation current epoch.',
},
loadingStakePoolsMessage: {
id: 'staking.delegationCenter.loadingStakePoolsMessage',
defaultMessage: '!!!Loading stake pools',
Expand All @@ -25,10 +32,19 @@ const messages = defineMessages({
type Props = {
wallets: Array<Wallet>,
numberOfStakePools: number,
numberOfRankedStakePools: number,
onDelegate: Function,
onUndelegate: Function,
getStakePoolById: Function,
isLoading: boolean,
nextEpoch: ?NextEpoch,
futureEpoch: ?FutureEpoch,
isListActive?: boolean,
currentTheme: string,
onOpenExternalLink: Function,
containerClassName: string,
setListActive?: Function,
listName?: string,
};

@observer
Expand All @@ -44,14 +60,28 @@ export default class DelegationCenterBody extends Component<Props> {
const {
wallets,
numberOfStakePools,
numberOfRankedStakePools,
onDelegate,
onUndelegate,
getStakePoolById,
isLoading,
nextEpoch,
futureEpoch,
isListActive,
currentTheme,
onOpenExternalLink,
containerClassName,
setListActive,
listName,
} = this.props;

const title = intl.formatMessage(messages.bodyTitle);

const currentEpochTitle = intl.formatMessage(messages.currentEpochTitle);

const nextEpochNumber = get(nextEpoch, 'epochNumber', 0);
const futureEpochNumber = get(futureEpoch, 'epochNumber', 0);

const loadingSpinner = (
<LoadingSpinner
big
Expand All @@ -76,20 +106,36 @@ export default class DelegationCenterBody extends Component<Props> {
) : (
<div>
<div className={styles.bodyTitle}>
<span>{title}</span>
<div className={styles.leftBodyTitle}>{title}</div>
{nextEpochNumber && futureEpochNumber && (
<div className={styles.rightBodyTitle}>
<span>{currentEpochTitle}</span>
<span>{nextEpochNumber}</span>
<span>{futureEpochNumber}</span>
</div>
)}
</div>
<div className={styles.mainContent}>
{wallets.map((wallet: Wallet) => (
<WalletRow
key={wallet.id}
wallet={wallet}
numberOfStakePools={numberOfStakePools}
numberOfRankedStakePools={numberOfRankedStakePools}
onDelegate={() => onDelegate(wallet.id)}
onUndelegate={() => onUndelegate(wallet.id)}
delegatedStakePool={getStakePoolById(
wallet.delegatedStakePoolId
)}
getStakePoolById={getStakePoolById}
nextEpochNumber={nextEpochNumber}
futureEpochNumber={futureEpochNumber}
currentTheme={currentTheme}
isListActive={isListActive}
listName={listName}
onOpenExternalLink={onOpenExternalLink}
containerClassName={containerClassName}
setListActive={setListActive}
/>
))}
</div>
Expand Down
@@ -1,7 +1,7 @@
@import '../stakingConfig';

.component {
margin: 0 0 20px 20px;
margin: 20px 0 20px 20px;

&.isLoading {
align-items: center;
Expand All @@ -17,7 +17,23 @@

.bodyTitle {
@extend %regularLightColorText;
margin: 0 0 10px 20px;
display: flex;
justify-content: space-between;
margin: 0 0 10px 0;
padding: 0 22px 0 20px;

.rightBodyTitle {
display: flex;
justify-content: space-between;
max-width: 332px;
width: 100%;

span {
display: flex;
justify-content: center;
width: 80px;
}
}
}

.mainContent {
Expand Down
@@ -1,7 +1,7 @@
@import '../stakingConfig';

.component {
margin: 20px 0 20px 20px;
margin: 20px 0 0 20px;
text-align: center;
}

Expand Down
Empty file.

0 comments on commit c49e054

Please sign in to comment.