Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
lightning-bits
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bitsoko services
lightning-bits
Commits
87d1b607
Commit
87d1b607
authored
May 16, 2019
by
Tankred Hase
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup seed-restore-mobile view
parent
dd760475
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
53 deletions
+41
-53
restore-seed-mobile.js
src/view/restore-seed-mobile.js
+41
-53
No files found.
src/view/restore-seed-mobile.js
View file @
87d1b607
import
React
,
{
Component
}
from
'react'
;
import
React
from
'react'
;
import
{
observer
}
from
'mobx-react'
;
import
PropTypes
from
'prop-types'
;
import
SeedEntry
from
'../component/seed-entry'
;
...
...
@@ -40,58 +40,46 @@ const styles = createStyles(
})
);
class
RestoreSeedView
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
focusedInput
:
0
,
};
}
render
()
{
const
{
store
,
wallet
}
=
this
.
props
;
return
(
<
Background
image
=
"purple-gradient-bg"
>
<
Header
>
<
BackButton
onPress
=
{()
=>
wallet
.
initPrevRestorePage
()}
/
>
<
Button
disabled
onPress
=
{()
=>
{}}
/
>
<
/Header
>
<
MainContent
style
=
{
styles
.
content
}
>
<
CopyOnboardText
style
=
{
styles
.
title
}
>
{
'Restore your wallet'
}
<
/CopyOnboardText
>
<
Card
>
<
FormSubText
style
=
{
styles
.
subText
}
>
{
store
.
restoreVerifyCopy
}
<
/FormSubText
>
{
store
.
restoreVerifyIndexes
.
map
((
seedIndex
,
i
)
=>
(
<
SeedEntry
seedIndex
=
{
seedIndex
}
value
=
{
store
.
seedMnemonic
[
seedIndex
-
1
]}
onChangeText
=
{
word
=>
wallet
.
setRestoreSeed
({
word
,
index
:
seedIndex
-
1
})
}
key
=
{
i
}
autoFocus
=
{
seedIndex
-
1
===
store
.
wallet
.
focusedRestoreInd
}
onSubmitEditing
=
{()
=>
i
===
2
?
wallet
.
initNextRestorePage
()
:
wallet
.
setFocusedRestoreInd
({
index
:
seedIndex
})
}
onClick
=
{()
=>
wallet
.
setFocusedRestoreInd
({
index
:
seedIndex
-
1
})
}
/
>
))}
<
/Card
>
<
SmallGlasButton
onPress
=
{()
=>
wallet
.
initNextRestorePage
()}
>
Next
<
/SmallGlasButton
>
<
/MainContent
>
<
/Background
>
);
}
}
const
RestoreSeedView
=
({
store
,
wallet
})
=>
(
<
Background
image
=
"purple-gradient-bg"
>
<
Header
>
<
BackButton
onPress
=
{()
=>
wallet
.
initPrevRestorePage
()}
/
>
<
Button
disabled
onPress
=
{()
=>
{}}
/
>
<
/Header
>
<
MainContent
style
=
{
styles
.
content
}
>
<
CopyOnboardText
style
=
{
styles
.
title
}
>
Restore
your
wallet
<
/CopyOnboardText
>
<
Card
>
<
FormSubText
style
=
{
styles
.
subText
}
>
{
store
.
restoreVerifyCopy
}
<
/FormSubText
>
{
store
.
restoreVerifyIndexes
.
map
((
seedIndex
,
i
)
=>
(
<
SeedEntry
seedIndex
=
{
seedIndex
}
value
=
{
store
.
seedMnemonic
[
seedIndex
-
1
]}
onChangeText
=
{
word
=>
wallet
.
setRestoreSeed
({
word
,
index
:
seedIndex
-
1
})
}
key
=
{
i
}
autoFocus
=
{
seedIndex
-
1
===
store
.
wallet
.
focusedRestoreInd
}
onSubmitEditing
=
{()
=>
i
===
2
?
wallet
.
initNextRestorePage
()
:
wallet
.
setFocusedRestoreInd
({
index
:
seedIndex
})
}
onClick
=
{()
=>
wallet
.
setFocusedRestoreInd
({
index
:
seedIndex
-
1
})
}
/
>
))}
<
/Card
>
<
SmallGlasButton
onPress
=
{()
=>
wallet
.
initNextRestorePage
()}
>
Next
<
/SmallGlasButton
>
<
/MainContent
>
<
/Background
>
);
RestoreSeedView
.
propTypes
=
{
store
:
PropTypes
.
object
.
isRequired
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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