mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Track seed phrase validation errors with MetaMetrics
This commit is contained in:
parent
98a2fb43fb
commit
4963ed65c0
@ -36,6 +36,20 @@ export default class ImportWithSeedPhrase extends PureComponent {
|
||||
.join(' ')
|
||||
}
|
||||
|
||||
componentWillMount () {
|
||||
window.onbeforeunload = () => this.context.metricsEvent({
|
||||
eventOpts: {
|
||||
category: 'Onboarding',
|
||||
action: 'Import Seed Phrase',
|
||||
name: 'Close window on import screen',
|
||||
},
|
||||
customVariables: {
|
||||
errorLabel: 'Seed Phrase Error',
|
||||
errorMessage: this.state.seedPhraseError,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
handleSeedPhraseChange (seedPhrase) {
|
||||
let seedPhraseError = ''
|
||||
|
||||
@ -172,6 +186,10 @@ export default class ImportWithSeedPhrase extends PureComponent {
|
||||
action: 'Import Seed Phrase',
|
||||
name: 'Go Back from Onboarding Import',
|
||||
},
|
||||
customVariables: {
|
||||
errorLabel: 'Seed Phrase Error',
|
||||
errorMessage: seedPhraseError,
|
||||
},
|
||||
})
|
||||
this.props.history.push(INITIALIZE_SELECT_ACTION_ROUTE)
|
||||
}}
|
||||
|
Loading…
Reference in New Issue
Block a user