diff --git a/src/status_im/translations/en.cljs b/src/status_im/translations/en.cljs index b78db7d668..17ab6f5f36 100644 --- a/src/status_im/translations/en.cljs +++ b/src/status_im/translations/en.cljs @@ -46,7 +46,7 @@ :password-placeholder2 "Confirm your password" :name-placeholder "Display name" :password_error1 "Password confirmation doesn't match password." - :password-description "You'll need this password to open the app, confirm transactions and whenever you need to regain access on a new device or install." + :password-description "You'll need this password to open the app and confirm transactions." :name-description "This will be the name everybody who uses Status will see. You can change it later." :other-accounts "Other accounts" :sign-you-in "Signing you in…" @@ -157,25 +157,25 @@ :testnet-text "You’re on the {{testnet}} Testnet. Do not send real ETH or SNT to your address" :mainnet-text "You’re on the Mainnet. Real ETH will be sent" :dev-mode "Development mode" - :backup-your-seed "Backup your Seed Phrase" + :backup-your-recovery-phrase "Backup your Recovery phrase" - ;;seed - :your-data-belongs-to-you "If you lose your seed phrase you lose your data and funds" - :your-data-belongs-to-you-description "Status can’t help you recover your account if you lose your seed phrase. You are in charge of the security of your data, and backing up your seed phrase is the best safeguard." + ;;recovery phrase + :your-data-belongs-to-you "If you lose your recovery phrase you lose your data and funds" + :your-data-belongs-to-you-description "Status can’t help you recover your account if you lose your recovery phrase. You are in charge of the security of your data, and backing up your recovery phrase is the best safeguard." :ok-continue "Ok, continue" - :your-seed-phrase "Your seed phrase" - :your-seed-phrase-description "This is your seed phrase. You use it to prove that this is your wallet. You only get to see it once! Write it on paper and keep it in a secure place. You will need it if you lose or reinstall your wallet." + :your-recovery-phrase "Your recovery phrase" + :your-recovery-phrase-description "This is your recovery phrase. You use it to prove that this is your wallet. You only get to see it once! Write it on paper and keep it in a secure place. You will need it if you lose or reinstall your wallet." :enter-word "Enter word" - :check-your-seed "Check your seed phrase" + :check-your-recovery-phrase "Check your recovery phrase" :wrong-word "Wrong word" :are-you-sure? "Are you sure?" - :are-you-sure-description "You will not be able to see the whole seed phrase again" + :are-you-sure-description "You will not be able to see the whole recovery phrase again" :you-are-all-set "You’re all set!" - :you-are-all-set-description "Now if you lose your phone you can restore your account and wallet using the seed phrase and password." + :you-are-all-set-description "Now if you lose your phone you can restore your account and wallet using the recovery phrase." :ok-got-it "Ok, got it" - :backup-seed-phrase "Backup Seed Phrase" + :backup-recovery-phrase "Backup Recovery phrase" :step-i-of-n "Step {{step}} of {{number}}" - :word-n-description "In order to check if you have backed up your seed phrase correctly, enter the word #{{number}} above." + :word-n-description "In order to check if you have backed up your recovery phrase correctly, enter the word #{{number}} above." :word-n "Word #{{number}}" :wallet-onboarding-title "Simple and secure cryptocurrency wallet" @@ -185,8 +185,8 @@ :wallet-set-up-signing-phrase "This is your personal transaction phrase that you’ll use everytime you make a transaction. Make sure to write it down on a piece of paper, store it somewhere, and only confirm transactions when you see these three words." :wallet-set-up-confirm-title "Wrote it down?" :wallet-set-up-confirm-description "You won’t be able to see your 3-word transaction phrase again after this." - :wallet-backup-seed-title "Backup your Seed Phrase" - :wallet-backup-seed-description "This will help you to keep your money safe" + :wallet-backup-recovery-title "Backup your Recovery phrase" + :wallet-backup-recovery-description "This will help you to keep your money safe" ;;make_photo :image-source-title "Edit picture" @@ -378,9 +378,10 @@ ;;recover :passphrase "Passphrase" + :recovery-phrase "Recovery phrase" :recover "Recover" :twelve-words-in-correct-order "12 words in correct order" - :enter-12-words "Enter the 12 words of your seed phrase" + :enter-12-words "Enter the 12 words of your recovery phrase, separated by single spaces" ;;accounts :recover-access "Recover access" @@ -683,7 +684,7 @@ ;; invalid-key :invalid-key-title "We detected a problem with the encryption key" - :invalid-key-content "To protect yourself, you need to create new account and erase your old data by tapping “Apply”. If you have an existing account and would like to save your seed phrase then choose “Cancel”, back it up, and restart the app. We strongly recommend creating new account because the old one is stored unencrypted." + :invalid-key-content "To protect yourself, you need to create new account and erase your old data by tapping “Apply”. If you have an existing account and would like to save your recovery phrase then choose “Cancel”, back it up, and restart the app. We strongly recommend creating new account because the old one is stored unencrypted." :invalid-key-confirm "Apply" ;; decryption-failed diff --git a/src/status_im/ui/screens/accounts/recover/styles.cljs b/src/status_im/ui/screens/accounts/recover/styles.cljs index 5e482590c4..78ac286c24 100644 --- a/src/status_im/ui/screens/accounts/recover/styles.cljs +++ b/src/status_im/ui/screens/accounts/recover/styles.cljs @@ -20,3 +20,7 @@ :font-size 13 :letter-spacing -0.2 :color colors/text-light-gray}) + +(def recovery-phrase-input + {:flex 1 + :text-align-vertical :top}) diff --git a/src/status_im/ui/screens/accounts/recover/views.cljs b/src/status_im/ui/screens/accounts/recover/views.cljs index 5e8d1d1cc7..af0f6639a4 100644 --- a/src/status_im/ui/screens/accounts/recover/views.cljs +++ b/src/status_im/ui/screens/accounts/recover/views.cljs @@ -24,10 +24,10 @@ {:component-did-mount (fn [_] (when config/testfairy-enabled? (.hideView js-dependencies/testfairy @input-ref)))} [text-input/text-input-with-label - {:style components.styles/flex + {:style styles/recovery-phrase-input :height 92 :ref (partial reset! input-ref) - :label (i18n/label :t/passphrase) + :label (i18n/label :t/recovery-phrase) :placeholder (i18n/label :t/enter-12-words) :multiline true :default-value passphrase diff --git a/src/status_im/ui/screens/profile/seed/views.cljs b/src/status_im/ui/screens/profile/seed/views.cljs index 0d75636eb0..82f27d5109 100644 --- a/src/status_im/ui/screens/profile/seed/views.cljs +++ b/src/status_im/ui/screens/profile/seed/views.cljs @@ -66,14 +66,14 @@ (.hideView js-dependencies/testfairy @ref)))} [react/view {:style styles/twelve-words-container} [react/text {:style styles/twelve-words-label} - (i18n/label :t/your-seed-phrase)] + (i18n/label :t/your-recovery-phrase)] [react/view {:style styles/twelve-words-columns :ref (partial reset! ref)} [six-words (subvec mnemonic-vec 0 6)] [react/view {:style styles/twelve-words-columns-separator}] [six-words (subvec mnemonic-vec 6 12)]] [react/text {:style styles/twelve-words-description} - (i18n/label :t/your-seed-phrase-description)] + (i18n/label :t/your-recovery-phrase-description)] [react/view styles/twelve-words-spacer] [react/view styles/twelve-words-button-container [components.common/bottom-button @@ -96,7 +96,7 @@ [react/view {:style styles/enter-word-container} [react/view {:style styles/enter-word-row} [react/text {:style styles/enter-word-label} - (i18n/label :t/check-your-seed)] + (i18n/label :t/check-your-recovery-phrase)] [react/text {:style styles/enter-word-n} (i18n/label :t/word-n {:number (inc idx)})]] [input error] @@ -145,7 +145,7 @@ (toolbar/nav-button (actions/back #(step-back step)))) [react/view [react/text {:style styles/backup-seed} - (i18n/label :t/backup-seed-phrase)] + (i18n/label :t/backup-recovery-phrase)] [react/text {:style styles/step-n} (i18n/label :t/step-i-of-n {:step (steps-numbers step) :number 3})]]] [components.common/separator] diff --git a/src/status_im/ui/screens/profile/user/views.cljs b/src/status_im/ui/screens/profile/user/views.cljs index 83ff8b464c..115327fd17 100644 --- a/src/status_im/ui/screens/profile/user/views.cljs +++ b/src/status_im/ui/screens/profile/user/views.cljs @@ -114,7 +114,7 @@ [profile.components/settings-item-separator]) (when show-backup-seed? [profile.components/settings-item - {:label-kw :t/backup-your-seed + {:label-kw :t/backup-your-recovery-phrase :action-fn #(re-frame/dispatch [:navigate-to :backup-seed]) :icon-content [components.common/counter {:size 22} 1]}]) [profile.components/settings-item-separator] diff --git a/src/status_im/ui/screens/wallet/views.cljs b/src/status_im/ui/screens/wallet/views.cljs index 25c5d9615d..c42e324e24 100644 --- a/src/status_im/ui/screens/wallet/views.cljs +++ b/src/status_im/ui/screens/wallet/views.cljs @@ -44,9 +44,9 @@ [react/view styles/backup-seed-phrase-container [react/view styles/backup-seed-phrase-text-container [react/text {:style styles/backup-seed-phrase-title} - (i18n/label :t/wallet-backup-seed-title)] + (i18n/label :t/wallet-backup-recovery-title)] [react/text {:style styles/backup-seed-phrase-description} - (i18n/label :t/wallet-backup-seed-description)]] + (i18n/label :t/wallet-backup-recovery-description)]] [vector-icons/icon :icons/forward {:color :white}]]]]) (def actions diff --git a/test/appium/tests/atomic/account_management/test_profile.py b/test/appium/tests/atomic/account_management/test_profile.py index 3ebeff8434..83d86c054d 100644 --- a/test/appium/tests/atomic/account_management/test_profile.py +++ b/test/appium/tests/atomic/account_management/test_profile.py @@ -96,7 +96,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase): @marks.testrail_id(2374) @marks.smoke_1 - def test_backup_seed_phrase(self): + def test_backup_recovery_phrase(self): sign_in_view = SignInView(self.driver) sign_in_view.create_user() if sign_in_view.profile_button.counter.text != '1': @@ -108,7 +108,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase): if sign_in_view.profile_button.counter.text != '1': self.errors.append('Profile button counter is not shown after relogin') sign_in_view.profile_button.click() - profile_view.backup_seed_phrase() + profile_view.backup_recovery_phrase() if sign_in_view.profile_button.counter.is_element_displayed(): self.errors.append('Profile button counter is shown after seed phrase backup') self.verify_no_errors() diff --git a/test/appium/tests/atomic/account_management/test_recover.py b/test/appium/tests/atomic/account_management/test_recover.py index 0ed6b7a698..209b44737f 100644 --- a/test/appium/tests/atomic/account_management/test_recover.py +++ b/test/appium/tests/atomic/account_management/test_recover.py @@ -16,16 +16,16 @@ class TestRecoverAccountSingleDevice(SingleDeviceTestCase): home = sign_in.create_user() public_key = home.get_public_key() profile = home.get_profile_view() - profile.backup_seed_phrase_button.click() + profile.backup_recovery_phrase_button.click() profile.ok_continue_button.click() - seed_phrase = profile.get_seed_phrase() + recovery_phrase = profile.get_recovery_phrase() profile.back_button.click() wallet = profile.wallet_button.click() wallet.set_up_wallet() address = wallet.get_wallet_address() self.driver.reset() sign_in.accept_agreements() - sign_in.recover_access(passphrase=' '.join(seed_phrase.values()), password=common_password) + sign_in.recover_access(passphrase=' '.join(recovery_phrase.values()), password=common_password) home.connection_status.wait_for_invisibility_of_element(30) home.wallet_button.click() wallet.set_up_wallet() @@ -44,13 +44,13 @@ class TestRecoverAccountSingleDevice(SingleDeviceTestCase): sign_in.create_user() public_key = sign_in.get_public_key() profile = sign_in.get_profile_view() - profile.backup_seed_phrase_button.click() + profile.backup_recovery_phrase_button.click() profile.ok_continue_button.click() - seed_phrase = profile.get_seed_phrase() + recovery_phrase = profile.get_recovery_phrase() self.driver.reset() sign_in.accept_agreements() - sign_in.recover_access(passphrase=' '.join(list(seed_phrase.values())[::-1]), password=common_password) + sign_in.recover_access(passphrase=' '.join(list(recovery_phrase.values())[::-1]), password=common_password) if sign_in.get_public_key() == public_key: pytest.fail('The same account is recovered with reversed passphrase') diff --git a/test/appium/views/profile_view.py b/test/appium/views/profile_view.py index 24a23e6c87..4133ab8660 100644 --- a/test/appium/views/profile_view.py +++ b/test/appium/views/profile_view.py @@ -165,25 +165,32 @@ class AdvancedButton(BaseButton): return self.navigate() -class BackupSeedPhraseButton(BaseButton): +class BackupRecoveryPhraseButton(BaseButton): def __init__(self, driver): - super(BackupSeedPhraseButton, self).__init__(driver) - self.locator = self.Locator.xpath_selector("//*[@text='Backup your Seed Phrase']") + super(BackupRecoveryPhraseButton, self).__init__(driver) + self.locator = self.Locator.text_selector('Backup your Recovery phrase') -class SeedPhraseTable(BaseText): +class OkContinueButton(BaseButton): def __init__(self, driver): - super(SeedPhraseTable, self).__init__(driver) + super(OkContinueButton, self).__init__(driver) + self.locator = self.Locator.xpath_selector("//*[@text='OK, CONTINUE']") + + +class RecoveryPhraseTable(BaseText): + + def __init__(self, driver): + super(RecoveryPhraseTable, self).__init__(driver) self.locator = self.Locator.xpath_selector( '//android.widget.FrameLayout/android.view.ViewGroup[3]/android.widget.TextView') -class SeedPhraseWordNumberText(BaseText): +class RecoveryPhraseWordNumberText(BaseText): def __init__(self, driver): - super(SeedPhraseWordNumberText, self).__init__(driver) + super(RecoveryPhraseWordNumberText, self).__init__(driver) self.locator = self.Locator.xpath_selector("//*[contains(@text,'#')]") @property @@ -192,10 +199,10 @@ class SeedPhraseWordNumberText(BaseText): return int(self.find_element().text.split('#')[1]) -class SeedPhraseWordInput(BaseEditBox): +class RecoveryPhraseWordInput(BaseEditBox): def __init__(self, driver): - super(SeedPhraseWordInput, self).__init__(driver) + super(RecoveryPhraseWordInput, self).__init__(driver) self.locator = self.Locator.xpath_selector('//android.widget.EditText') @@ -330,10 +337,11 @@ class ProfileView(BaseView): self.debug_mode_toggle = DebugModeToggle(self.driver) # Backup seed phrase - self.backup_seed_phrase_button = BackupSeedPhraseButton(self.driver) - self.seed_phrase_table = SeedPhraseTable(self.driver) - self.seed_phrase_word_number = SeedPhraseWordNumberText(self.driver) - self.seed_phrase_word_input = SeedPhraseWordInput(self.driver) + self.backup_recovery_phrase_button = BackupRecoveryPhraseButton(self.driver) + self.ok_continue_button = OkContinueButton(self.driver) + self.recovery_phrase_table = RecoveryPhraseTable(self.driver) + self.recovery_phrase_word_number = RecoveryPhraseWordNumberText(self.driver) + self.recovery_phrase_word_input = RecoveryPhraseWordInput(self.driver) self.ok_got_it_button = OkGotItButton(self.driver) self.select_from_gallery_button = SelectFromGalleryButton(self.driver) @@ -371,24 +379,24 @@ class ProfileView(BaseView): profile_view = self.profile_button.click() return profile_view.profile_address_text.text - def get_seed_phrase(self): - text = [i.text for i in self.seed_phrase_table.find_elements()] + def get_recovery_phrase(self): + text = [i.text for i in self.recovery_phrase_table.find_elements()] return dict(zip(map(int, text[::2]), text[1::2])) - def backup_seed_phrase(self): - self.backup_seed_phrase_button.click() + def backup_recovery_phrase(self): + self.backup_recovery_phrase_button.click() self.ok_continue_button.click() - seed_phrase = self.get_seed_phrase() + recovery_phrase = self.get_recovery_phrase() self.next_button.click() - word_number = self.seed_phrase_word_number.number - self.seed_phrase_word_input.set_value(seed_phrase[word_number]) + word_number = self.recovery_phrase_word_number.number + self.recovery_phrase_word_input.set_value(recovery_phrase[word_number]) self.next_button.click() - word_number_1 = self.seed_phrase_word_number.number - self.seed_phrase_word_input.set_value(seed_phrase[word_number_1]) + word_number_1 = self.recovery_phrase_word_number.number + self.recovery_phrase_word_input.set_value(recovery_phrase[word_number_1]) self.done_button.click() self.yes_button.click() self.ok_got_it_button.click() - return seed_phrase + return recovery_phrase def edit_profile_picture(self, file_name: str): if not AbstractTestCase().environment == 'sauce': diff --git a/test/appium/views/recover_access_view.py b/test/appium/views/recover_access_view.py index 60fcda2e84..99baeb1f37 100644 --- a/test/appium/views/recover_access_view.py +++ b/test/appium/views/recover_access_view.py @@ -6,7 +6,7 @@ class PassphraseInput(BaseEditBox): def __init__(self, driver): super(PassphraseInput, self).__init__(driver) - self.locator = self.Locator.xpath_selector("//android.widget.TextView[@text='Passphrase']") + self.locator = self.Locator.xpath_selector("//android.widget.EditText[contains(@text,'phrase')]") class ConfirmRecoverAccess(BaseButton):