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:
parent
6d135d7048
commit
bab48c809a
@ -10,6 +10,7 @@ import {
|
|||||||
import { DEFAULT_ROUTE } from '../../helpers/constants/routes';
|
import { DEFAULT_ROUTE } from '../../helpers/constants/routes';
|
||||||
import TextField from '../../components/ui/text-field';
|
import TextField from '../../components/ui/text-field';
|
||||||
import Button from '../../components/ui/button';
|
import Button from '../../components/ui/button';
|
||||||
|
import { clearClipboard } from '../../helpers/utils/util';
|
||||||
|
|
||||||
const { isValidMnemonic } = ethers.utils;
|
const { isValidMnemonic } = ethers.utils;
|
||||||
|
|
||||||
@ -173,6 +174,7 @@ class RestoreVaultPage extends Component {
|
|||||||
{showSeedPhrase ? (
|
{showSeedPhrase ? (
|
||||||
<textarea
|
<textarea
|
||||||
className="import-account__secret-phrase"
|
className="import-account__secret-phrase"
|
||||||
|
onPaste={clearClipboard}
|
||||||
onChange={(e) => this.handleSeedPhraseChange(e.target.value)}
|
onChange={(e) => this.handleSeedPhraseChange(e.target.value)}
|
||||||
value={seedPhrase}
|
value={seedPhrase}
|
||||||
autoFocus
|
autoFocus
|
||||||
@ -182,6 +184,7 @@ class RestoreVaultPage extends Component {
|
|||||||
<TextField
|
<TextField
|
||||||
className="import-account__textarea import-account__seedphrase"
|
className="import-account__textarea import-account__seedphrase"
|
||||||
type="password"
|
type="password"
|
||||||
|
onPaste={clearClipboard}
|
||||||
onChange={(e) => this.handleSeedPhraseChange(e.target.value)}
|
onChange={(e) => this.handleSeedPhraseChange(e.target.value)}
|
||||||
value={seedPhrase}
|
value={seedPhrase}
|
||||||
autoFocus
|
autoFocus
|
||||||
|
Loading…
x
Reference in New Issue
Block a user