diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 6ec3bb0e20c8..2b5e5a384b32 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -366,7 +366,7 @@ "message": "Confirmed" }, "confirmPassword": { - "message": "Confirm Password" + "message": "Confirm password" }, "confirmSecretBackupPhrase": { "message": "Confirm your Secret Backup Phrase" @@ -780,10 +780,10 @@ "message": " Imported accounts will not be associated with your originally created MetaMask account seedphrase. Learn more about imported accounts " }, "importAccountSeedPhrase": { - "message": "Import an Account with Seed Phrase" + "message": "Import an account with seed phrase" }, "importWallet": { - "message": "Import Wallet" + "message": "Import wallet" }, "importYourExisting": { "message": "Import your existing wallet using a 12 word seed phrase" @@ -982,7 +982,7 @@ "message": "New Contract" }, "newPassword": { - "message": "New Password (min 8 chars)" + "message": "New password (min 8 chars)" }, "newNetwork": { "message": "New Network" @@ -1277,6 +1277,12 @@ "seedPhrasePlaceholder": { "message": "Separate each word with a single space" }, + "seedPhrasePlaceholderPaste": { + "message": "Paste seed phrase from clipboard" + }, + "showSeedPhrase": { + "message": "Show seed phrase" + }, "seedPhraseReq": { "message": "Seed phrases contain 12, 15, 18, 21, or 24 words" }, @@ -1698,7 +1704,7 @@ "message": "Visit our web site" }, "walletSeed": { - "message": "Wallet Seed" + "message": "Seed phrase" }, "welcomeBack": { "message": "Welcome Back!" diff --git a/test/e2e/from-import-ui.spec.js b/test/e2e/from-import-ui.spec.js index 6771dfd6b037..0b5d1fa82b1c 100644 --- a/test/e2e/from-import-ui.spec.js +++ b/test/e2e/from-import-ui.spec.js @@ -64,7 +64,7 @@ describe('Using MetaMask with an existing account', function () { }) it('clicks the "Import Wallet" option', async function () { - await driver.clickElement(By.xpath(`//button[contains(text(), 'Import Wallet')]`)) + await driver.clickElement(By.xpath(`//button[contains(text(), 'Import wallet')]`)) await driver.delay(largeDelayMs) }) @@ -74,7 +74,7 @@ describe('Using MetaMask with an existing account', function () { }) it('imports a seed phrase', async function () { - const [seedTextArea] = await driver.findElements(By.css('textarea.first-time-flow__textarea')) + const [seedTextArea] = await driver.findElements(By.css('input[placeholder="Paste seed phrase from clipboard"]')) await seedTextArea.sendKeys(testSeedPhrase) await driver.delay(regularDelayMs) @@ -83,7 +83,7 @@ describe('Using MetaMask with an existing account', function () { const [confirmPassword] = await driver.findElements(By.id('confirm-password')) confirmPassword.sendKeys('correct horse battery staple') - await driver.clickElement(By.css('.first-time-flow__checkbox')) + await driver.clickElement(By.css('.first-time-flow__terms')) await driver.clickElement(By.xpath(`//button[contains(text(), 'Import')]`)) await driver.delay(regularDelayMs) diff --git a/test/e2e/send-edit.spec.js b/test/e2e/send-edit.spec.js index d5b9f8e55f9f..891dcc3b8828 100644 --- a/test/e2e/send-edit.spec.js +++ b/test/e2e/send-edit.spec.js @@ -61,7 +61,7 @@ describe('Using MetaMask with an existing account', function () { }) it('clicks the "Import Wallet" option', async function () { - await driver.clickElement(By.xpath(`//button[contains(text(), 'Import Wallet')]`)) + await driver.clickElement(By.xpath(`//button[contains(text(), 'Import wallet')]`)) await driver.delay(largeDelayMs) }) @@ -71,7 +71,7 @@ describe('Using MetaMask with an existing account', function () { }) it('imports a seed phrase', async function () { - const [seedTextArea] = await driver.findElements(By.css('textarea.first-time-flow__textarea')) + const [seedTextArea] = await driver.findElements(By.css('input[placeholder="Paste seed phrase from clipboard"]')) await seedTextArea.sendKeys(testSeedPhrase) await driver.delay(regularDelayMs) @@ -80,7 +80,7 @@ describe('Using MetaMask with an existing account', function () { const [confirmPassword] = await driver.findElements(By.id('confirm-password')) confirmPassword.sendKeys('correct horse battery staple') - await driver.clickElement(By.css('.first-time-flow__checkbox')) + await driver.clickElement(By.css('.first-time-flow__terms')) await driver.clickElement(By.xpath(`//button[contains(text(), 'Import')]`)) await driver.delay(regularDelayMs) diff --git a/test/e2e/threebox.spec.js b/test/e2e/threebox.spec.js index 54f7f01cd15c..553878548d3e 100644 --- a/test/e2e/threebox.spec.js +++ b/test/e2e/threebox.spec.js @@ -64,7 +64,7 @@ describe('MetaMask', function () { }) it('clicks the "Import Wallet" option', async function () { - await driver.clickElement(By.xpath(`//button[contains(text(), 'Import Wallet')]`)) + await driver.clickElement(By.xpath(`//button[contains(text(), 'Import wallet')]`)) await driver.delay(largeDelayMs) }) @@ -74,7 +74,7 @@ describe('MetaMask', function () { }) it('imports a seed phrase', async function () { - const [seedTextArea] = await driver.findElements(By.css('textarea.first-time-flow__textarea')) + const [seedTextArea] = await driver.findElements(By.css('input[placeholder="Paste seed phrase from clipboard"]')) await seedTextArea.sendKeys(testSeedPhrase) await driver.delay(regularDelayMs) @@ -83,7 +83,7 @@ describe('MetaMask', function () { const [confirmPassword] = await driver.findElements(By.id('confirm-password')) confirmPassword.sendKeys('correct horse battery staple') - await driver.clickElement(By.css('.first-time-flow__checkbox')) + await driver.clickElement(By.css('.first-time-flow__terms')) await driver.clickElement(By.xpath(`//button[contains(text(), 'Import')]`)) await driver.delay(regularDelayMs) @@ -170,7 +170,7 @@ describe('MetaMask', function () { }) it('clicks the "Import Wallet" option', async function () { - await driver2.clickElement(By.xpath(`//button[contains(text(), 'Import Wallet')]`)) + await driver2.clickElement(By.xpath(`//button[contains(text(), 'Import wallet')]`)) await driver2.delay(largeDelayMs) }) @@ -180,7 +180,7 @@ describe('MetaMask', function () { }) it('imports a seed phrase', async function () { - const [seedTextArea] = await driver2.findElements(By.css('textarea.first-time-flow__textarea')) + const [seedTextArea] = await driver2.findElements(By.css('input[placeholder="Paste seed phrase from clipboard"]')) await seedTextArea.sendKeys(testSeedPhrase) await driver2.delay(regularDelayMs) @@ -189,7 +189,7 @@ describe('MetaMask', function () { const [confirmPassword] = await driver2.findElements(By.id('confirm-password')) confirmPassword.sendKeys('correct horse battery staple') - await driver2.clickElement(By.css('.first-time-flow__checkbox')) + await driver2.clickElement(By.css('.first-time-flow__terms')) await driver2.clickElement(By.xpath(`//button[contains(text(), 'Import')]`)) await driver2.delay(regularDelayMs) diff --git a/test/e2e/web3.spec.js b/test/e2e/web3.spec.js index 2aae92bc1a57..7c2c4c5e5848 100644 --- a/test/e2e/web3.spec.js +++ b/test/e2e/web3.spec.js @@ -60,7 +60,7 @@ describe('Using MetaMask with an existing account', function () { }) it('clicks the "Import Wallet" option', async function () { - await driver.clickElement(By.xpath(`//button[contains(text(), 'Import Wallet')]`)) + await driver.clickElement(By.xpath(`//button[contains(text(), 'Import wallet')]`)) await driver.delay(largeDelayMs) }) @@ -70,7 +70,7 @@ describe('Using MetaMask with an existing account', function () { }) it('imports a seed phrase', async function () { - const [seedTextArea] = await driver.findElements(By.css('textarea.first-time-flow__textarea')) + const [seedTextArea] = await driver.findElements(By.css('input[placeholder="Paste seed phrase from clipboard"]')) await seedTextArea.sendKeys(testSeedPhrase) await driver.delay(regularDelayMs) @@ -79,7 +79,7 @@ describe('Using MetaMask with an existing account', function () { const [confirmPassword] = await driver.findElements(By.id('confirm-password')) confirmPassword.sendKeys('correct horse battery staple') - await driver.clickElement(By.css('.first-time-flow__checkbox')) + await driver.clickElement(By.css('.first-time-flow__terms')) await driver.clickElement(By.xpath(`//button[contains(text(), 'Import')]`)) await driver.delay(regularDelayMs) diff --git a/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js b/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js index dbe6303031a3..24e72623d0ab 100644 --- a/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js +++ b/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js @@ -23,6 +23,7 @@ export default class ImportWithSeedPhrase extends PureComponent { state = { seedPhrase: '', + showSeedPhrase: false, password: '', confirmPassword: '', seedPhraseError: '', @@ -195,9 +196,15 @@ export default class ImportWithSeedPhrase extends PureComponent { })) } + toggleShowSeedPhrase = () => { + this.setState(({ showSeedPhrase }) => ({ + showSeedPhrase: !showSeedPhrase, + })) + } + render () { const { t } = this.context - const { seedPhraseError, passwordError, confirmPasswordError, termsChecked } = this.state + const { seedPhraseError, showSeedPhrase, passwordError, confirmPasswordError, termsChecked } = this.state return (