diff --git a/CHANGELOG.md b/CHANGELOG.md index 17179bf58e..91f9fb1b24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,12 +5,15 @@ Changelog ### Features +- Enabled wallet creation regardless of the sync progress ([PR 2150](https://github.com/input-output-hk/daedalus/pull/2150)) +- Enabled restoration of "Shelley" wallets regardless of the sync progress ([PR 2150](https://github.com/input-output-hk/daedalus/pull/2150)) - Enabled restoration of Yoroi "Shelley" wallets ([PR 2144](https://github.com/input-output-hk/daedalus/pull/2144)) - Enabled "Send" screen for "Byron" wallets ([PR 2147](https://github.com/input-output-hk/daedalus/pull/2147)) - Added SMASH support ([PR 2143](https://github.com/input-output-hk/daedalus/pull/2143)) ### Fixes +- Fixed display priority of Daedalus shutdown messages on the "Loading" screen ([PR 2150](https://github.com/input-output-hk/daedalus/pull/2150)) - Fixed double loading spinner issue on stake pools list page ([PR 2144](https://github.com/input-output-hk/daedalus/pull/2144)) - Fixed the Japanese translation for "Byron" wallet label ([PR 2147](https://github.com/input-output-hk/daedalus/pull/2147)) - Fixed validation of spending passwords which include spaces ([PR 2147](https://github.com/input-output-hk/daedalus/pull/2147)) diff --git a/source/renderer/app/api/api.js b/source/renderer/app/api/api.js index 58eeedb687..94ac0094f2 100644 --- a/source/renderer/app/api/api.js +++ b/source/renderer/app/api/api.js @@ -102,7 +102,6 @@ import { REDEEM_ITN_REWARDS_AMOUNT } from '../config/stakingConfig'; import { ADA_CERTIFICATE_MNEMONIC_LENGTH, WALLET_RECOVERY_PHRASE_WORD_COUNT, - LEGACY_WALLET_RECOVERY_PHRASE_WORD_COUNT, } from '../config/cryptoConfig'; // Addresses Types @@ -213,16 +212,10 @@ export default class AdaApi { this.config = config; } - getWallets = async (request: { - isShelleyActivated: boolean, - }): Promise> => { + getWallets = async (): Promise> => { logger.debug('AdaApi::getWallets called'); - const { isShelleyActivated } = request; try { - const wallets: AdaWallets = - isIncentivizedTestnet || isShelleyActivated - ? await getWallets(this.config) - : []; + const wallets: AdaWallets = await getWallets(this.config); const legacyWallets: LegacyAdaWallets = await getLegacyWallets( this.config ); @@ -535,61 +528,70 @@ export default class AdaApi { } }; - createWallet = async (request: { - walletDetails: CreateWalletRequest, - isShelleyActivated: boolean, - }): Promise => { + createWallet = async (request: CreateWalletRequest): Promise => { logger.debug('AdaApi::createWallet called', { parameters: filterLogData(request), }); - const { walletDetails, isShelleyActivated } = request; - const { name, mnemonic, spendingPassword } = walletDetails; + const { name, mnemonic, spendingPassword } = request; try { - let wallet: AdaWallet; const walletInitData = { name, mnemonic_sentence: split(mnemonic, ' '), passphrase: spendingPassword, }; + const wallet: AdaWallet = await createWallet(this.config, { + walletInitData, + }); + logger.debug('AdaApi::createWallet success', { wallet }); + return _createWalletFromServerData(wallet); + } catch (error) { + logger.error('AdaApi::createWallet error', { error }); + throw new ApiError(error); + } + }; - if (isIncentivizedTestnet || isShelleyActivated) { - wallet = await createWallet(this.config, { - walletInitData, - }); - logger.debug('AdaApi::createWallet (Shelley) success', { wallet }); - } else { - const legacyWallet: LegacyAdaWallet = await restoreByronWallet( - this.config, - { walletInitData }, - 'random' - ); - - // Generate address for the newly created Byron wallet - const { id: walletId } = legacyWallet; - const address: Address = await createByronWalletAddress(this.config, { - passphrase: spendingPassword, - walletId, - }); - logger.debug('AdaApi::createAddress (Byron) success', { address }); - - const extraLegacyWalletProps = { - address_pool_gap: 0, // Not needed for legacy wallets - delegation: { - active: { - status: WalletDelegationStatuses.NOT_DELEGATING, - }, + createLegacyWallet = async ( + request: CreateWalletRequest + ): Promise => { + logger.debug('AdaApi::createLegacyWallet called', { + parameters: filterLogData(request), + }); + const { name, mnemonic, spendingPassword } = request; + try { + const walletInitData = { + name, + mnemonic_sentence: split(mnemonic, ' '), + passphrase: spendingPassword, + }; + const legacyWallet: LegacyAdaWallet = await restoreByronWallet( + this.config, + { walletInitData }, + 'random' + ); + // Generate address for the newly created Byron wallet + const { id: walletId } = legacyWallet; + const address: Address = await createByronWalletAddress(this.config, { + passphrase: spendingPassword, + walletId, + }); + logger.debug('AdaApi::createByronWalletAddress success', { address }); + const extraLegacyWalletProps = { + address_pool_gap: 0, // Not needed for legacy wallets + delegation: { + active: { + status: WalletDelegationStatuses.NOT_DELEGATING, }, - isLegacy: true, - }; - wallet = { - ...legacyWallet, - ...extraLegacyWalletProps, - }; - logger.debug('AdaApi::createWallet (Byron) success', { wallet }); - } + }, + isLegacy: true, + }; + const wallet: AdaWallet = { + ...legacyWallet, + ...extraLegacyWalletProps, + }; + logger.debug('AdaApi::createLegacyWallet success', { wallet }); return _createWalletFromServerData(wallet); } catch (error) { - logger.error('AdaApi::createWallet error', { error }); + logger.error('AdaApi::createLegacyWallet error', { error }); throw new ApiError(error); } }; @@ -815,20 +817,11 @@ export default class AdaApi { isValidCertificateMnemonic = (mnemonic: string): boolean => mnemonic.split(' ').length === ADA_CERTIFICATE_MNEMONIC_LENGTH; - getWalletRecoveryPhrase(request: { - isShelleyActivated: string, - }): Promise> { - const { isShelleyActivated } = request; + getWalletRecoveryPhrase(): Promise> { logger.debug('AdaApi::getWalletRecoveryPhrase called'); try { const response: Promise> = new Promise(resolve => - resolve( - generateAccountMnemonics( - isIncentivizedTestnet || isShelleyActivated - ? WALLET_RECOVERY_PHRASE_WORD_COUNT - : LEGACY_WALLET_RECOVERY_PHRASE_WORD_COUNT - ) - ) + resolve(generateAccountMnemonics(WALLET_RECOVERY_PHRASE_WORD_COUNT)) ); logger.debug('AdaApi::getWalletRecoveryPhrase success'); return response; @@ -1603,8 +1596,7 @@ export default class AdaApi { testReset = async (): Promise => { logger.debug('AdaApi::testReset called'); try { - // @TODO - pass isShelleyActivated parameter from E2E tests - const wallets = await this.getWallets({ isShelleyActivated: false }); + const wallets = await this.getWallets(); await Promise.all( wallets.map(wallet => this.deleteWallet({ diff --git a/source/renderer/app/api/utils/patchAdaApi.js b/source/renderer/app/api/utils/patchAdaApi.js index a133f0fbf8..9aabb2cd43 100644 --- a/source/renderer/app/api/utils/patchAdaApi.js +++ b/source/renderer/app/api/utils/patchAdaApi.js @@ -216,11 +216,8 @@ export default (api: AdaApi) => { }); }); - api.getWallets = async (request: { - isShelleyActivated: boolean, - }): Promise> => { - const { isShelleyActivated } = request; - const originalWallets = await originalGetWallets({ isShelleyActivated }); + api.getWallets = async (): Promise> => { + const originalWallets = await originalGetWallets(); const modifiedWallets = originalWallets.map( (originalWallet: Wallet, index: number) => { const testingWallet = TESTING_WALLETS_DATA[index] || {}; diff --git a/source/renderer/app/components/loading/syncing-connecting/SyncingConnectingStatus.js b/source/renderer/app/components/loading/syncing-connecting/SyncingConnectingStatus.js index fd16e96fb7..0ad656744f 100644 --- a/source/renderer/app/components/loading/syncing-connecting/SyncingConnectingStatus.js +++ b/source/renderer/app/components/loading/syncing-connecting/SyncingConnectingStatus.js @@ -95,6 +95,7 @@ export default class SyncingConnectingStatus extends Component { const { cardanoNodeState, hasBeenConnected, + isVerifyingBlockchain, isTlsCertInvalid, isConnected, } = this.props; @@ -137,6 +138,9 @@ export default class SyncingConnectingStatus extends Component { if (isTlsCertInvalid && isConnectingMessage) { return messages.tlsCertificateNotValidError; } + if (isVerifyingBlockchain && isConnectingMessage) { + return messages.verifyingBlockchain; + } return connectingMessage; }; @@ -148,7 +152,6 @@ export default class SyncingConnectingStatus extends Component { isNodeStopped, isTlsCertInvalid, hasLoadedCurrentLocale, - isVerifyingBlockchain, verificationProgress, } = this.props; @@ -170,11 +173,9 @@ export default class SyncingConnectingStatus extends Component { return (

- {isVerifyingBlockchain - ? intl.formatMessage(messages.verifyingBlockchain, { - verificationProgress, - }) - : intl.formatMessage(this._getConnectingMessage())} + {intl.formatMessage(this._getConnectingMessage(), { + verificationProgress, + })}

); diff --git a/source/renderer/app/components/wallet/WalletAdd.js b/source/renderer/app/components/wallet/WalletAdd.js index 918672c959..4e954cf189 100644 --- a/source/renderer/app/components/wallet/WalletAdd.js +++ b/source/renderer/app/components/wallet/WalletAdd.js @@ -100,7 +100,6 @@ type Props = { isMainnet: boolean, isTestnet: boolean, isProduction: boolean, - isShelleyActivated: boolean, }; @observer @@ -124,7 +123,6 @@ export default class WalletAdd extends Component { isMainnet, isTestnet, isProduction, - isShelleyActivated, } = this.props; const componentClasses = classnames([styles.component, 'WalletAdd']); @@ -148,10 +146,7 @@ export default class WalletAdd extends Component { ? intl.formatMessage(messages.createDescriptionItn) : intl.formatMessage(messages.createDescription) } - isDisabled={ - isMaxNumberOfWalletsReached || - (!isIncentivizedTestnet && !isShelleyActivated) - } + isDisabled={isMaxNumberOfWalletsReached} /> , onCancelBackup: Function, @@ -59,7 +58,6 @@ export default class WalletBackupDialog extends Component { onUpdateVerificationPhrase, onFinishBackup, onRestartBackup, - isShelleyActivated, } = this.props; if (currentStep === WALLET_BACKUP_STEPS.PRIVACY_WARNING) { @@ -68,7 +66,6 @@ export default class WalletBackupDialog extends Component { canPhraseBeShown={canPhraseBeShown} isPrivacyNoticeAccepted={isPrivacyNoticeAccepted} countdownRemaining={countdownRemaining} - isShelleyActivated={isShelleyActivated} onAcceptPrivacyNotice={onAcceptPrivacyNotice} onCancelBackup={onCancelBackup} onContinue={onContinue} @@ -81,7 +78,6 @@ export default class WalletBackupDialog extends Component { recoveryPhrase={recoveryPhrase} onStartWalletBackup={onStartWalletBackup} onCancelBackup={onCancelBackup} - isShelleyActivated={isShelleyActivated} /> ); } @@ -94,7 +90,6 @@ export default class WalletBackupDialog extends Component { isTermRecoveryAccepted={isTermRecoveryAccepted} isTermRewardsAccepted={isTermRewardsAccepted} isValid={isValid} - isShelleyActivated={isShelleyActivated} isSubmitting={isSubmitting} onAcceptTermOffline={onAcceptTermOffline} onAcceptTermRecovery={onAcceptTermRecovery} diff --git a/source/renderer/app/components/wallet/WalletCreateDialog.js b/source/renderer/app/components/wallet/WalletCreateDialog.js index 2fdfa1e5c9..7bc0c9e28e 100644 --- a/source/renderer/app/components/wallet/WalletCreateDialog.js +++ b/source/renderer/app/components/wallet/WalletCreateDialog.js @@ -24,15 +24,10 @@ import { FORM_VALIDATION_DEBOUNCE_WAIT } from '../../config/timingConfig'; import { submitOnEnter } from '../../utils/form'; const messages = defineMessages({ - dialogTitleItn: { - id: 'wallet.create.dialog.title.itn', - defaultMessage: '!!!Create a new wallet', - description: 'Title "Create a new wallet" in the wallet create form.', - }, dialogTitle: { id: 'wallet.create.dialog.title', - defaultMessage: '!!!Create a wallet', - description: 'Title "Create a wallet" in the wallet create form.', + defaultMessage: '!!!Create a new wallet', + description: 'Title "Create a new wallet" in the wallet create form.', }, walletName: { id: 'wallet.create.dialog.name.label', @@ -46,17 +41,11 @@ const messages = defineMessages({ description: 'Hint for the "Wallet Name" text input in the wallet create form.', }, - createPersonalWalletItn: { - id: 'wallet.create.dialog.create.personal.wallet.button.label.itn', - defaultMessage: '!!!Create Shelley wallet', - description: - 'Label for the "Create Shelley wallet" button on create wallet dialog.', - }, createPersonalWallet: { id: 'wallet.create.dialog.create.personal.wallet.button.label', - defaultMessage: '!!!Create wallet', + defaultMessage: '!!!Create Shelley wallet', description: - 'Label for the "Create wallet" button on create wallet dialog.', + 'Label for the "Create Shelley wallet" button on create wallet dialog.', }, passwordSectionLabel: { id: 'wallet.create.dialog.passwordSectionLabel', @@ -88,10 +77,7 @@ const messages = defineMessages({ }, }); -const { isIncentivizedTestnet } = global; - type Props = { - isShelleyActivated: boolean, onSubmit: Function, onCancel: Function, }; @@ -211,7 +197,7 @@ export default class WalletCreateDialog extends Component { render() { const { form } = this; const { intl } = this.context; - const { onCancel, isShelleyActivated } = this.props; + const { onCancel } = this.props; const { isSubmitting } = this.state; const dialogClasses = classnames([styles.component, 'WalletCreateDialog']); @@ -225,11 +211,7 @@ export default class WalletCreateDialog extends Component { { className: isSubmitting ? styles.isSubmitting : null, disabled: !canSubmit, - label: this.context.intl.formatMessage( - isIncentivizedTestnet || isShelleyActivated - ? messages.createPersonalWalletItn - : messages.createPersonalWallet - ), + label: this.context.intl.formatMessage(messages.createPersonalWallet), primary: true, onClick: this.submit, }, @@ -238,11 +220,7 @@ export default class WalletCreateDialog extends Component { return ( {}} diff --git a/source/renderer/app/components/wallet/backup-recovery/WalletBackupPrivacyWarningDialog.js b/source/renderer/app/components/wallet/backup-recovery/WalletBackupPrivacyWarningDialog.js index 9792f7383f..bd4608c1f2 100644 --- a/source/renderer/app/components/wallet/backup-recovery/WalletBackupPrivacyWarningDialog.js +++ b/source/renderer/app/components/wallet/backup-recovery/WalletBackupPrivacyWarningDialog.js @@ -9,10 +9,7 @@ import Dialog from '../../widgets/Dialog'; import DialogCloseButton from '../../widgets/DialogCloseButton'; import WalletRecoveryInstructions from './WalletRecoveryInstructions'; import globalMessages from '../../../i18n/global-messages'; -import { - LEGACY_WALLET_RECOVERY_PHRASE_WORD_COUNT, - WALLET_RECOVERY_PHRASE_WORD_COUNT, -} from '../../../config/cryptoConfig'; +import { WALLET_RECOVERY_PHRASE_WORD_COUNT } from '../../../config/cryptoConfig'; import styles from './WalletBackupPrivacyWarningDialog.scss'; const messages = defineMessages({ @@ -64,7 +61,6 @@ type Props = { countdownRemaining: number, canPhraseBeShown: boolean, isPrivacyNoticeAccepted: boolean, - isShelleyActivated: boolean, onAcceptPrivacyNotice: Function, onContinue: Function, onCancelBackup: Function, @@ -81,7 +77,6 @@ export default class WalletBackupPrivacyWarningDialog extends Component { const { countdownRemaining, canPhraseBeShown, - isShelleyActivated, onAcceptPrivacyNotice, onCancelBackup, isPrivacyNoticeAccepted, @@ -117,10 +112,7 @@ export default class WalletBackupPrivacyWarningDialog extends Component { instructionsText={intl.formatMessage( messages.recoveryPhraseInstructions1, { - walletRecoveryPhraseWordCount: - isIncentivizedTestnet || isShelleyActivated - ? WALLET_RECOVERY_PHRASE_WORD_COUNT - : LEGACY_WALLET_RECOVERY_PHRASE_WORD_COUNT, + walletRecoveryPhraseWordCount: WALLET_RECOVERY_PHRASE_WORD_COUNT, } )} /> diff --git a/source/renderer/app/components/wallet/backup-recovery/WalletRecoveryPhraseDisplayDialog.js b/source/renderer/app/components/wallet/backup-recovery/WalletRecoveryPhraseDisplayDialog.js index fe0e089b5b..937fff2980 100644 --- a/source/renderer/app/components/wallet/backup-recovery/WalletRecoveryPhraseDisplayDialog.js +++ b/source/renderer/app/components/wallet/backup-recovery/WalletRecoveryPhraseDisplayDialog.js @@ -9,10 +9,7 @@ import Dialog from '../../widgets/Dialog'; import WalletRecoveryInstructions from './WalletRecoveryInstructions'; import globalMessages from '../../../i18n/global-messages'; import styles from './WalletRecoveryPhraseDisplayDialog.scss'; -import { - WALLET_RECOVERY_PHRASE_WORD_COUNT, - LEGACY_WALLET_RECOVERY_PHRASE_WORD_COUNT, -} from '../../../config/cryptoConfig'; +import { WALLET_RECOVERY_PHRASE_WORD_COUNT } from '../../../config/cryptoConfig'; const messages = defineMessages({ backupInstructions: { @@ -31,11 +28,8 @@ const messages = defineMessages({ }, }); -const { isIncentivizedTestnet } = global; - type Props = { recoveryPhrase: string, - isShelleyActivated: boolean, onStartWalletBackup: Function, onCancelBackup: Function, }; @@ -48,12 +42,7 @@ export default class WalletRecoveryPhraseDisplayDialog extends Component render() { const { intl } = this.context; - const { - recoveryPhrase, - onStartWalletBackup, - onCancelBackup, - isShelleyActivated, - } = this.props; + const { recoveryPhrase, onStartWalletBackup, onCancelBackup } = this.props; const dialogClasses = classnames([ styles.component, 'WalletRecoveryPhraseDisplayDialog', @@ -81,10 +70,7 @@ export default class WalletRecoveryPhraseDisplayDialog extends Component } diff --git a/source/renderer/app/components/wallet/backup-recovery/WalletRecoveryPhraseEntryDialog.js b/source/renderer/app/components/wallet/backup-recovery/WalletRecoveryPhraseEntryDialog.js index a6bfddfd3c..50b8ebf7b5 100644 --- a/source/renderer/app/components/wallet/backup-recovery/WalletRecoveryPhraseEntryDialog.js +++ b/source/renderer/app/components/wallet/backup-recovery/WalletRecoveryPhraseEntryDialog.js @@ -9,10 +9,7 @@ import { AutocompleteSkin } from 'react-polymorph/lib/skins/simple/AutocompleteS import { Checkbox } from 'react-polymorph/lib/components/Checkbox'; import { CheckboxSkin } from 'react-polymorph/lib/skins/simple/CheckboxSkin'; import { defineMessages, intlShape, FormattedHTMLMessage } from 'react-intl'; -import { - WALLET_RECOVERY_PHRASE_WORD_COUNT, - LEGACY_WALLET_RECOVERY_PHRASE_WORD_COUNT, -} from '../../../config/cryptoConfig'; +import { WALLET_RECOVERY_PHRASE_WORD_COUNT } from '../../../config/cryptoConfig'; import suggestedMnemonics from '../../../../../common/config/crypto/valid-words.en'; import { isValidMnemonic } from '../../../../../common/config/crypto/decrypt'; import ReactToolboxMobxForm from '../../../utils/ReactToolboxMobxForm'; @@ -91,7 +88,6 @@ const { isIncentivizedTestnet } = global; type Props = { enteredPhrase: Array, isValid: boolean, - isShelleyActivated: boolean, isTermOfflineAccepted: boolean, isTermRecoveryAccepted: boolean, isTermRewardsAccepted: boolean, @@ -121,10 +117,7 @@ export default class WalletRecoveryPhraseEntryDialog extends Component { const { intl } = this.context; const enteredWords = field.value; const wordCount = enteredWords.length; - const expectedWordCount = - isIncentivizedTestnet || this.props.isShelleyActivated - ? WALLET_RECOVERY_PHRASE_WORD_COUNT - : LEGACY_WALLET_RECOVERY_PHRASE_WORD_COUNT; + const expectedWordCount = WALLET_RECOVERY_PHRASE_WORD_COUNT; const value = join(enteredWords, ' '); this.props.onUpdateVerificationPhrase({ @@ -165,7 +158,6 @@ export default class WalletRecoveryPhraseEntryDialog extends Component { const { enteredPhrase, isValid, - isShelleyActivated, isTermOfflineAccepted, isTermRecoveryAccepted, isTermRewardsAccepted, @@ -183,10 +175,7 @@ export default class WalletRecoveryPhraseEntryDialog extends Component { styles.component, 'WalletRecoveryPhraseEntryDialog', ]); - const wordCount = - isIncentivizedTestnet || isShelleyActivated - ? WALLET_RECOVERY_PHRASE_WORD_COUNT - : LEGACY_WALLET_RECOVERY_PHRASE_WORD_COUNT; + const wordCount = WALLET_RECOVERY_PHRASE_WORD_COUNT; const enteredPhraseString = enteredPhrase.join(' '); const actions = [ diff --git a/source/renderer/app/components/wallet/wallet-restore/WalletTypeDialog.js b/source/renderer/app/components/wallet/wallet-restore/WalletTypeDialog.js index 8a256a1140..5068cbb4dd 100644 --- a/source/renderer/app/components/wallet/wallet-restore/WalletTypeDialog.js +++ b/source/renderer/app/components/wallet/wallet-restore/WalletTypeDialog.js @@ -153,7 +153,6 @@ type Props = { onContinue: Function, onClose: Function, onSetWalletKind: Function, - isShelleyActivated: boolean, walletKind: ?WalletKind, walletKindDaedalus: ?WalletDaedalusKind, walletKindYoroi: ?WalletYoroiKind, @@ -179,7 +178,6 @@ export default class WalletTypeDialog extends Component { this.setState(currentState => set({}, param, !currentState[param])); getWalletKind = ( - isShelleyActivated: boolean, kinds: Object, message: string, value: ?string, @@ -196,7 +194,7 @@ export default class WalletTypeDialog extends Component { } return { key: kind, - disabled: !isShelleyActivated && kind.includes('Shelley'), + disabled: false, label: , selected: value === kind, onChange: () => this.props.onSetWalletKind(kind, kindParam), @@ -236,7 +234,6 @@ export default class WalletTypeDialog extends Component { const { onClose, onContinue, - isShelleyActivated, walletKind, walletKindDaedalus, walletKindYoroi, @@ -262,7 +259,6 @@ export default class WalletTypeDialog extends Component { >
{this.getWalletKind( - isShelleyActivated, WALLET_KINDS, messages.labelWalletKind, walletKind @@ -271,7 +267,6 @@ export default class WalletTypeDialog extends Component {
{walletKind === WALLET_KINDS.DAEDALUS && this.getWalletKind( - isShelleyActivated, WALLET_DAEDALUS_KINDS, messages.labelDaedalusWalletKind, walletKindDaedalus, @@ -279,7 +274,6 @@ export default class WalletTypeDialog extends Component { )} {walletKind === WALLET_KINDS.YOROI && this.getWalletKind( - isShelleyActivated, WALLET_YOROI_KINDS, messages.labelYoroiWalletKind, walletKindYoroi, @@ -288,7 +282,6 @@ export default class WalletTypeDialog extends Component { {walletKind === WALLET_KINDS.HARDWARE && ( {this.getWalletKind( - isShelleyActivated, WALLET_HARDWARE_KINDS, messages.labelHardwareWalletKind, walletKindHardware, diff --git a/source/renderer/app/containers/wallet/WalletAddPage.js b/source/renderer/app/containers/wallet/WalletAddPage.js index 47a0ec483e..7171b09a67 100644 --- a/source/renderer/app/containers/wallet/WalletAddPage.js +++ b/source/renderer/app/containers/wallet/WalletAddPage.js @@ -31,7 +31,7 @@ export default class WalletAddPage extends Component { render() { const { actions, stores } = this.props; - const { networkStatus, wallets, walletMigration, uiDialogs } = stores; + const { wallets, walletMigration, uiDialogs } = stores; const { createWalletStep, createWalletUseNewProcess, @@ -39,7 +39,6 @@ export default class WalletAddPage extends Component { restoreWalletUseNewProcess, environment, } = wallets; - const { isShelleyActivated } = networkStatus; const { walletMigrationStep } = walletMigration; const { isMainnet, isTestnet, isProduction } = environment; @@ -83,7 +82,6 @@ export default class WalletAddPage extends Component { isMainnet={isMainnet} isTestnet={isTestnet} isProduction={isProduction} - isShelleyActivated={isShelleyActivated} /> {activeDialog} diff --git a/source/renderer/app/containers/wallet/dialogs/WalletBackupDialogContainer.js b/source/renderer/app/containers/wallet/dialogs/WalletBackupDialogContainer.js index e6e9493014..f5c362628a 100644 --- a/source/renderer/app/containers/wallet/dialogs/WalletBackupDialogContainer.js +++ b/source/renderer/app/containers/wallet/dialogs/WalletBackupDialogContainer.js @@ -46,7 +46,6 @@ export default class WalletBackupDialogContainer extends Component { continueToRecoveryPhraseForWalletBackup, } = actions.walletBackup; const { createWalletRequest } = stores.wallets; - const { isShelleyActivated } = stores.networkStatus; const canFinishBackup = global.isIncentivizedTestnet ? isRecoveryPhraseValid && @@ -88,7 +87,6 @@ export default class WalletBackupDialogContainer extends Component { finishWalletBackup.trigger(); }} onRestartBackup={restartWalletBackup.trigger} - isShelleyActivated={isShelleyActivated} /> ); } diff --git a/source/renderer/app/containers/wallet/dialogs/wallet-restore/StepWalletTypeContainer.js b/source/renderer/app/containers/wallet/dialogs/wallet-restore/StepWalletTypeContainer.js index 61977ae555..dc811e0990 100644 --- a/source/renderer/app/containers/wallet/dialogs/wallet-restore/StepWalletTypeContainer.js +++ b/source/renderer/app/containers/wallet/dialogs/wallet-restore/StepWalletTypeContainer.js @@ -24,12 +24,10 @@ export default class WalletTypeDialogContainer extends Component { walletKindYoroi, walletKindHardware, } = stores.wallets; - const { isShelleyActivated } = stores.networkStatus; return ( Hardware wallet Device", diff --git a/source/renderer/app/i18n/locales/ja-JP.json b/source/renderer/app/i18n/locales/ja-JP.json index a29fe03524..a989765c36 100755 --- a/source/renderer/app/i18n/locales/ja-JP.json +++ b/source/renderer/app/i18n/locales/ja-JP.json @@ -589,8 +589,7 @@ "wallet.byron.notification.moveFundsDescription.line2.link.label": "ウォレットを新規作成する", "wallet.byron.notification.moveFundsTitle": "「{activeWalletName}」の資金を移してください", "wallet.create.dialog.configStep": "!!!Config", - "wallet.create.dialog.create.personal.wallet.button.label": "ウォレットを作成する", - "wallet.create.dialog.create.personal.wallet.button.label.itn": "Shelleyウォレットを作成する", + "wallet.create.dialog.create.personal.wallet.button.label": "Shelleyウォレットを作成する", "wallet.create.dialog.hashImageStep": "!!!Hash & Image", "wallet.create.dialog.instructionsStep": "!!!Instructions", "wallet.create.dialog.mnemonicsStep": "!!!Mnemonics", @@ -602,8 +601,7 @@ "wallet.create.dialog.spendingPasswordLabel": "パスワードを入力してください", "wallet.create.dialog.stepsCounter": "ステップ{currentStep}/{totalSteps}", "wallet.create.dialog.templateStep": "!!!Template", - "wallet.create.dialog.title": "ウォレットを作成する", - "wallet.create.dialog.title.itn": "Shelleyウォレットを新規作成する", + "wallet.create.dialog.title": "Shelleyウォレットを新規作成する", "wallet.create.dialog.validateStep": "!!!Validate", "wallet.create.dialog.walletNameHint": "ウォレット名を入力してください", "wallet.hardware.hardwareWalletBegin": "!!!To begin, connect and unlock your Hardware wallet Device", diff --git a/source/renderer/app/stores/WalletsStore.js b/source/renderer/app/stores/WalletsStore.js index ac9fae6b6f..3e11fe315c 100644 --- a/source/renderer/app/stores/WalletsStore.js +++ b/source/renderer/app/stores/WalletsStore.js @@ -276,12 +276,10 @@ export default class WalletsStore extends Store { } _create = async (params: { name: string, spendingPassword: string }) => { - const { isShelleyActivated } = this.stores.networkStatus; Object.assign(this._newWalletDetails, params); try { - const recoveryPhrase: ?Array = await this.getWalletRecoveryPhraseRequest.execute( - { isShelleyActivated } - ).promise; + const recoveryPhrase: ?Array = await this.getWalletRecoveryPhraseRequest.execute() + .promise; if (recoveryPhrase != null) { this.actions.walletBackup.initiateWalletBackup.trigger({ recoveryPhrase, @@ -432,11 +430,9 @@ export default class WalletsStore extends Store { this._newWalletDetails.mnemonic = this.stores.walletBackup.recoveryPhrase.join( ' ' ); - const { isShelleyActivated } = this.stores.networkStatus; - const wallet = await this.createWalletRequest.execute({ - walletDetails: this._newWalletDetails, - isShelleyActivated, - }).promise; + const wallet = await this.createWalletRequest.execute( + this._newWalletDetails + ).promise; if (wallet) { await this._patchWalletRequestWithNewWallet(wallet); this.actions.dialogs.closeActiveDialog.trigger(); @@ -927,9 +923,7 @@ export default class WalletsStore extends Store { if (this._pollingBlocked) return; if (this.stores.networkStatus.isConnected) { - const { isShelleyActivated } = this.stores.networkStatus; - const result = await this.walletsRequest.execute({ isShelleyActivated }) - .promise; + const result = await this.walletsRequest.execute().promise; if (!result) return; const walletIds = result .filter( diff --git a/storybook/stories/wallets/addWallet/Add.stories.js b/storybook/stories/wallets/addWallet/Add.stories.js index 142e7b4e86..bff7b200e1 100644 --- a/storybook/stories/wallets/addWallet/Add.stories.js +++ b/storybook/stories/wallets/addWallet/Add.stories.js @@ -26,7 +26,6 @@ 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( diff --git a/storybook/stories/wallets/addWallet/Restore.stories.js b/storybook/stories/wallets/addWallet/Restore.stories.js index ae7afb6c8a..3055e9acec 100644 --- a/storybook/stories/wallets/addWallet/Restore.stories.js +++ b/storybook/stories/wallets/addWallet/Restore.stories.js @@ -49,7 +49,6 @@ storiesOf('Wallets|Add Wallet', module) onContinue={action('onContinue')} onClose={action('onClose')} onSetWalletKind={action('onSetWalletKind')} - isShelleyActivated walletKind={walletKindSelect} walletKindDaedalus={walletKindSpecificSelect} walletKindYoroi={walletKindSpecificSelect} diff --git a/tests/wallets/e2e/steps/helpers.js b/tests/wallets/e2e/steps/helpers.js index 72d2a02945..a154e3e0ff 100644 --- a/tests/wallets/e2e/steps/helpers.js +++ b/tests/wallets/e2e/steps/helpers.js @@ -283,10 +283,7 @@ const createWalletsSequentially = async function(wallets: Array) { spendingPassword: wallet.password || 'Secret1234', }; daedalus.api.ada - .createWallet({ - walletDetails, - isShelleyActivated: false, // @TODO - pass real flag from staking store - }) + .createWallet(walletDetails) .then(() => daedalus.stores.wallets.walletsRequest .execute() @@ -325,10 +322,7 @@ const createWalletsAsync = async function(table, isLegacy?: boolean) { spendingPassword: wallet.password || 'Secret1234', }; if (isLegacyWallet) { - return createWallet({ - walletDetails, - isShelleyActivated: false, // @TODO - pass real flag from staking store - }) + return createWallet(walletDetails) } return restoreByronRandomWallet({ name: wallet.name,