diff --git a/packages/yoroi-extension/app/components/wallet/restore/RestoreWalletPage.js b/packages/yoroi-extension/app/components/wallet/restore/RestoreWalletPage.js index e5bc417ae8..2be89b143b 100644 --- a/packages/yoroi-extension/app/components/wallet/restore/RestoreWalletPage.js +++ b/packages/yoroi-extension/app/components/wallet/restore/RestoreWalletPage.js @@ -174,7 +174,6 @@ function RestoreWalletPage(props: Props & Intl): Node { throw new Error('unexpected nullish restore mode'); } const isValid = walletRestore.isValidMnemonic({ mnemonic: phrase, mode: selectedRestoreMode }); - ampli.restoreWalletEnterPhraseStepStatus({ recovery_prhase_status: isValid }); return isValid; }} openDuplicatedWallet={lastDuplicatedWalletId => { diff --git a/packages/yoroi-extension/app/components/wallet/restore/steps/phrase/RestoreRecoveryPhraseForm.js b/packages/yoroi-extension/app/components/wallet/restore/steps/phrase/RestoreRecoveryPhraseForm.js index cd96c0fc11..449980803a 100644 --- a/packages/yoroi-extension/app/components/wallet/restore/steps/phrase/RestoreRecoveryPhraseForm.js +++ b/packages/yoroi-extension/app/components/wallet/restore/steps/phrase/RestoreRecoveryPhraseForm.js @@ -15,6 +15,7 @@ import Autocomplete from '../../../../common/autocomplete/Autocomplete'; import { ReactComponent as VerifiedIcon } from '../../../../../assets/images/verify-icon-green.inline.svg'; import { Box, Button, Fade, Stack, Typography } from '@mui/material'; import environment from '../../../../../environment'; +import { ampli } from '../../../../../../ampli/index'; const messages = defineMessages({ title: { @@ -191,6 +192,13 @@ export default class RestoreRecoveryPhraseForm extends Component { noResultsMessage={intl.formatMessage(globalMessages.recoveryPhraseNoResults)} {...fieldBind} onFocus={e => e.target.setSelectionRange(0, e.target.value?.length)} + onChange={(newWord) => { + fieldBind.onChange(newWord); + if (newWord && idx === recoveryPhrase.length - 1) { + const isValid = isValidMnemonic(form.values().recoveryPhrase); + ampli.restoreWalletEnterPhraseStepStatus({ recovery_prhase_status: isValid }); + } + }} />