Skip to content

Commit

Permalink
[DDW-336] Disabled wallet creation before the Shelley HF (#2126)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolaglumac authored Aug 3, 2020
1 parent 3ab7a42 commit 6a0ff84
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ Changelog

## vNext

### Features

- Disabled creating Byron wallets ([PR 2126](https://github.com/input-output-hk/daedalus/pull/2126))

### Fixes

- Fixed Daedalus logo animation on the "Loading" screen ([PR 2124](https://github.com/input-output-hk/daedalus/pull/2124))
Expand Down
7 changes: 6 additions & 1 deletion source/renderer/app/components/wallet/WalletAdd.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ type Props = {
isMainnet: boolean,
isTestnet: boolean,
isProduction: boolean,
isShelleyActivated: boolean,
};

@observer
Expand All @@ -123,6 +124,7 @@ export default class WalletAdd extends Component<Props> {
isMainnet,
isTestnet,
isProduction,
isShelleyActivated,
} = this.props;

const componentClasses = classnames([styles.component, 'WalletAdd']);
Expand All @@ -146,7 +148,10 @@ export default class WalletAdd extends Component<Props> {
? intl.formatMessage(messages.createDescriptionItn)
: intl.formatMessage(messages.createDescription)
}
isDisabled={isMaxNumberOfWalletsReached}
isDisabled={
isMaxNumberOfWalletsReached ||
(!isIncentivizedTestnet && !isShelleyActivated)
}
/>
<BigButtonForDialogs
className="joinWalletButton"
Expand Down
6 changes: 3 additions & 3 deletions source/renderer/app/containers/wallet/WalletAddPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,16 @@ export default class WalletAddPage extends Component<Props> {

render() {
const { actions, stores } = this.props;
const { wallets, walletMigration, uiDialogs } = stores;
const { networkStatus, wallets, walletMigration, uiDialogs } = stores;
const {
createWalletStep,
createWalletUseNewProcess,
restoreWalletStep,
restoreWalletUseNewProcess,
environment,
} = wallets;

const { isShelleyActivated } = networkStatus;
const { walletMigrationStep } = walletMigration;

const { isMainnet, isTestnet, isProduction } = environment;

const onCreateWallet = createWalletUseNewProcess
Expand Down Expand Up @@ -84,6 +83,7 @@ export default class WalletAddPage extends Component<Props> {
isMainnet={isMainnet}
isTestnet={isTestnet}
isProduction={isProduction}
isShelleyActivated={isShelleyActivated}
/>
{activeDialog}
</Layout>
Expand Down
1 change: 1 addition & 0 deletions storybook/stories/wallets/addWallet/Add.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ storiesOf('Wallets|Add Wallet', module)
onImport={() => {}}
isMainnet={boolean('isMainnet', true)}
isTestnet={boolean('isTestnet', false)}
isShelleyActivated={boolean('isShelleyActivated', true)}
isProduction
isIncentivizedTestnet={isIncentivizedTestnetTheme(props.currentTheme)}
isMaxNumberOfWalletsReached={boolean(
Expand Down

0 comments on commit 6a0ff84

Please sign in to comment.