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
7f268eac
Commit
7f268eac
authored
May 04, 2019
by
Thibaut Sardan
Browse files
fix(): revert onComponentUpdate and remove useless async/await
parent
4065a501
Changes
3
Hide whitespace changes
Inline
Side-by-side
rust/signer/Cargo.lock
View file @
7f268eac
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
[[package]]
name = "adler32"
version = "1.0.3"
...
...
src/screens/AccountBackup.js
View file @
7f268eac
...
...
@@ -39,17 +39,12 @@ export default class AccountBackup extends React.PureComponent {
}
}
class
AccountBackupView
extends
React
.
Component
{
class
AccountBackupView
extends
React
.
Pure
Component
{
constructor
(...
args
)
{
super
(...
args
);
this
.
handleAppStateChange
=
this
.
handleAppStateChange
.
bind
(
this
);
}
shouldComponentUpdate
(
nextProps
)
{
const
hasEmptySeed
=
nextProps
.
accounts
.
state
.
newAccount
.
seed
===
""
;
return
!
hasEmptySeed
;
}
componentDidMount
()
{
AppState
.
addEventListener
(
'
change
'
,
this
.
handleAppStateChange
);
}
...
...
@@ -60,13 +55,13 @@ class AccountBackupView extends React.Component {
}
}
async
componentWillUnmount
()
{
componentWillUnmount
()
{
const
{
accounts
}
=
this
.
props
;
const
selected
=
accounts
.
getNew
().
address
&&
accounts
.
getNew
().
address
.
length
?
accounts
.
getNew
()
:
accounts
.
getSelected
();
await
accounts
.
lockAccount
(
selected
);
accounts
.
lockAccount
(
selected
);
AppState
.
removeEventListener
(
'
change
'
,
this
.
_handleAppStateChange
);
}
...
...
src/screens/AccountNew.js
View file @
7f268eac
...
...
@@ -45,12 +45,6 @@ export default class AccountNew extends React.Component {
}
class
AccountNewView
extends
React
.
Component
{
shouldComponentUpdate
(
nextProps
)
{
const
hasEmptySeed
=
nextProps
.
accounts
.
state
.
newAccount
.
seed
===
""
;
return
!
hasEmptySeed
;
}
render
()
{
const
{
accounts
}
=
this
.
props
;
const
selected
=
accounts
.
getNew
();
...
...
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