From 38c099cdf0297b2ef0275c8ae01a88d04bb7f9a7 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Mon, 17 Aug 2020 11:21:57 +1000 Subject: [PATCH] rename seed to recovery phrase --- .../session/LeftPaneSettingSection.tsx | 6 ++-- ts/components/session/SessionSeedModal.tsx | 34 +++++++++---------- .../session/settings/SessionSettings.tsx | 2 +- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/ts/components/session/LeftPaneSettingSection.tsx b/ts/components/session/LeftPaneSettingSection.tsx index a1e4f7645..699dcb23b 100644 --- a/ts/components/session/LeftPaneSettingSection.tsx +++ b/ts/components/session/LeftPaneSettingSection.tsx @@ -151,8 +151,8 @@ export class LeftPaneSettingSection extends React.Component { const dangerButtonText = isSecondaryDevice ? window.i18n('unpairDevice') - : window.i18n('deleteAccount'); - const showSeed = window.i18n('showSeed'); + : window.i18n('clearAllData'); + const showRecoveryPhrase = window.i18n('showRecoveryPhrase'); return (
@@ -164,7 +164,7 @@ export class LeftPaneSettingSection extends React.Component { /> {!isSecondaryDevice && ( { error: '', loadingPassword: true, loadingSeed: true, - seed: '', + recoveryPhrase: '', hasPassword: null, passwordHash: '', passwordValid: false, }; - this.copySeed = this.copySeed.bind(this); - this.getSeed = this.getSeed.bind(this); + this.copyRecoveryPhrase = this.copyRecoveryPhrase.bind(this); + this.getRecoveryPhrase = this.getRecoveryPhrase.bind(this); this.confirmPassword = this.confirmPassword.bind(this); this.checkHasPassword = this.checkHasPassword.bind(this); this.onEnter = this.onEnter.bind(this); @@ -47,7 +47,7 @@ export class SessionSeedModal extends React.Component { const i18n = window.i18n; this.checkHasPassword(); - this.getSeed().ignore(); + this.getRecoveryPhrase().ignore(); const { onClose } = this.props; const { hasPassword, passwordValid } = this.state; @@ -57,7 +57,7 @@ export class SessionSeedModal extends React.Component { <> {!loading && ( null} onClose={onClose} > @@ -102,7 +102,7 @@ export class SessionSeedModal extends React.Component {
@@ -126,7 +126,7 @@ export class SessionSeedModal extends React.Component {

- {this.state.seed} + {this.state.recoveryPhrase}
@@ -134,9 +134,9 @@ export class SessionSeedModal extends React.Component { { - this.copySeed(this.state.seed); + this.copyRecoveryPhrase(this.state.recoveryPhrase); }} />
@@ -194,29 +194,29 @@ export class SessionSeedModal extends React.Component { }); } - private async getSeed() { - if (this.state.seed) { + private async getRecoveryPhrase() { + if (this.state.recoveryPhrase) { return false; } const manager = await window.getAccountManager(); - const seed = manager.getCurrentMnemonic(); + const recoveryPhrase = manager.getCurrentMnemonic(); this.setState({ - seed, + recoveryPhrase, loadingSeed: false, }); return true; } - private copySeed(seed: string) { - window.clipboard.writeText(seed); + private copyRecoveryPhrase(recoveryPhrase: string) { + window.clipboard.writeText(recoveryPhrase); ToastUtils.push({ title: window.i18n('copiedToClipboard'), type: 'success', - id: 'copySeedToast', + id: 'copyRecoveryPhraseToast', }); } diff --git a/ts/components/session/settings/SessionSettings.tsx b/ts/components/session/settings/SessionSettings.tsx index 043dcd6dd..0a727a4ed 100644 --- a/ts/components/session/settings/SessionSettings.tsx +++ b/ts/components/session/settings/SessionSettings.tsx @@ -192,7 +192,7 @@ export class SettingsView extends React.Component {