1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00

Clear the clipboard after seed phrase is pasted (Restore vault) (#12987)

This commit is contained in:
ryanml 2021-12-06 12:17:56 -07:00 committed by Dan Miller
parent 6adb48d9f0
commit f4ce5bfb6f

View File

@ -10,6 +10,7 @@ import {
import { DEFAULT_ROUTE } from '../../helpers/constants/routes';
import TextField from '../../components/ui/text-field';
import Button from '../../components/ui/button';
import { clearClipboard } from '../../helpers/utils/util';
const { isValidMnemonic } = ethers.utils;
@ -173,6 +174,7 @@ class RestoreVaultPage extends Component {
{showSeedPhrase ? (
<textarea
className="import-account__secret-phrase"
onPaste={clearClipboard}
onChange={(e) => this.handleSeedPhraseChange(e.target.value)}
value={seedPhrase}
autoFocus
@ -182,6 +184,7 @@ class RestoreVaultPage extends Component {
<TextField
className="import-account__textarea import-account__seedphrase"
type="password"
onPaste={clearClipboard}
onChange={(e) => this.handleSeedPhraseChange(e.target.value)}
value={seedPhrase}
autoFocus