diff options
author | Dan Miller <danjm.com@gmail.com> | 2019-04-05 11:16:25 +0800 |
---|---|---|
committer | Dan Miller <danjm.com@gmail.com> | 2019-04-05 12:02:18 +0800 |
commit | 4963ed65c0ee6f827fa6302079d4d8e0a4fdb0aa (patch) | |
tree | 753daaa7d4d3f6ed475cc32a77b9473e0cde6c51 | |
parent | 98a2fb43fb371584d3cd6730958f0f3d17fc0d12 (diff) | |
download | tangerine-wallet-browser-4963ed65c0ee6f827fa6302079d4d8e0a4fdb0aa.tar tangerine-wallet-browser-4963ed65c0ee6f827fa6302079d4d8e0a4fdb0aa.tar.gz tangerine-wallet-browser-4963ed65c0ee6f827fa6302079d4d8e0a4fdb0aa.tar.bz2 tangerine-wallet-browser-4963ed65c0ee6f827fa6302079d4d8e0a4fdb0aa.tar.lz tangerine-wallet-browser-4963ed65c0ee6f827fa6302079d4d8e0a4fdb0aa.tar.xz tangerine-wallet-browser-4963ed65c0ee6f827fa6302079d4d8e0a4fdb0aa.tar.zst tangerine-wallet-browser-4963ed65c0ee6f827fa6302079d4d8e0a4fdb0aa.zip |
Track seed phrase validation errors with MetaMetrics
-rw-r--r-- | ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js b/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js index 433dad6e2..96ff11eaf 100644 --- a/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js +++ b/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js @@ -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) }} |