1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01: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 GitHub
parent 6d135d7048
commit bab48c809a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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