feat: reset is copied rec phrase when mnemonic is changed

This commit is contained in:
RadoslavDimchev 2024-01-12 10:21:56 +02:00
parent 550a3bb339
commit 5ca47a8ced
1 changed files with 4 additions and 0 deletions

View File

@ -24,6 +24,10 @@ const RecoveryPhrase = ({ isKeystoreFiles }: RecoveryPhraseProps) => {
getMnemonic() getMnemonic()
}, []) }, [])
useEffect(() => {
setIsCopied(false)
}, [generatedMnemonic])
const getMnemonic = async () => { const getMnemonic = async () => {
const mnemonic = await generateMnemonic(wordlist, 256) const mnemonic = await generateMnemonic(wordlist, 256)
dispatch(setGeneratedMnemonic(mnemonic.split(' '))) dispatch(setGeneratedMnemonic(mnemonic.split(' ')))