Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
parity-signer
Commits
04d134fe
Unverified
Commit
04d134fe
authored
Jul 25, 2019
by
Thibaut Sardan
Committed by
GitHub
Jul 25, 2019
Browse files
Merge pull request #265 from paritytech/tbaut-erase-phrase
Make sure the recovery phrase is emptied upon process abortion
parents
87886f9e
25a466fc
Pipeline
#44642
failed with stage
in 18 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/screens/AccountRecover.js
View file @
04d134fe
...
...
@@ -17,7 +17,7 @@
'
use strict
'
;
import
React
from
'
react
'
;
import
{
Alert
,
findNodeHandle
,
SafeAreaView
,
StyleSheet
,
ScrollView
,
Text
,
View
}
from
'
react-native
'
;
import
{
Alert
,
SafeAreaView
,
ScrollView
,
StyleSheet
,
Text
}
from
'
react-native
'
;
import
{
KeyboardAwareScrollView
}
from
'
react-native-keyboard-aware-scroll-view
'
import
{
Subscribe
}
from
'
unstated
'
;
...
...
@@ -37,6 +37,7 @@ export default class AccountRecover extends React.Component {
title
:
'
Recover Account
'
,
headerBackTitle
:
'
Back
'
};
render
()
{
return
(
<
Subscribe
to
=
{[
AccountsStore
]}
>
...
...
@@ -51,6 +52,11 @@ class AccountRecoverView extends React.Component {
super
(...
args
);
}
componentWillUnmount
=
function
()
{
// called when the user goes back, or finishes the whole recovery process
this
.
props
.
accounts
.
updateNew
({
seed
:
''
});
}
render
()
{
const
{
accounts
}
=
this
.
props
;
const
selected
=
accounts
.
getNew
();
...
...
@@ -86,9 +92,7 @@ class AccountRecoverView extends React.Component {
<
/Text
>
<
AccountSeed
valid
=
{
validateSeed
(
selected
.
seed
,
selected
.
validBip39Seed
).
valid
}
onChangeText
=
{
seed
=>
{
accounts
.
updateNew
({
seed
});
}}
onChangeText
=
{
seed
=>
accounts
.
updateNew
({
seed
})}
value
=
{
selected
.
seed
}
/
>
<
AccountCard
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment