@ -17,6 +17,8 @@ class Bip39KeysPanel extends React.Component {
passphrase : '' ,
seedInputVisibility : false ,
trimPassphraseTimer : null ,
addressdepth : 20 ,
accounts : 1 ,
} ;
this . _ getBip39Keys = this . _ getBip39Keys . bind ( this ) ;
this . updateInput = this . updateInput . bind ( this ) ;
@ -35,6 +37,9 @@ class Bip39KeysPanel extends React.Component {
passphrase : '' ,
keys : null ,
match : null ,
accounts : 1 ,
addressdepth : 20 ,
seedInputVisibility : false ,
} ) ) ;
}
}
@ -86,8 +91,12 @@ class Bip39KeysPanel extends React.Component {
}
_ getBip39Keys ( ) {
shepherdElectrumBip39Keys ( this . state . passphrase , this . state . match )
. then ( ( res ) => {
shepherdElectrumBip39Keys (
this . state . passphrase ,
this . state . match ,
this . state . addressdepth ,
this . state . accounts
) . then ( ( res ) => {
this . setState ( {
keys : res . result . priv ? res . result : 'empty' ,
} ) ;
@ -110,7 +119,7 @@ class Bip39KeysPanel extends React.Component {
< / h 4 >
< div > { translate ( 'SETTINGS.BIP39_DESC_P1' ) } < / d i v >
< div > { translate ( 'SETTINGS.BIP39_DESC_P2' ) } < / d i v >
< div >
< div className = "bip39-search" >
< div className = "col-sm-12 no-padding-left margin-top-10" >
< div className = "form-group form-material floating" >
< input
@ -138,7 +147,7 @@ class Bip39KeysPanel extends React.Component {
htmlFor = "passphrase" > { translate ( 'INDEX.PASSPHRASE' ) } < / l a b e l >
< / d i v >
< / d i v >
< div className = "col-sm-4 no-padding-left text-center " >
< div className = "col-sm-5 no-padding-left " >
< input
type = "text"
className = "form-control margin-top-10"
@ -153,6 +162,43 @@ class Bip39KeysPanel extends React.Component {
disabled = { ! this . state . match || ! this . state . passphrase || this . state . passphrase . length < 2 }
onClick = { this . _ getBip39Keys } > Get key < / b u t t o n >
< / d i v >
< div className = "col-sm-2 no-padding-left text-center margin-top-10 margin-left-50" >
< select
className = "form-control form-material"
name = "accounts"
value = { this . state . accounts }
onChange = { ( event ) => this . updateInput ( event ) }
autoFocus >
< option value = "1" > 1 account < / o p t i o n >
< option value = "2" > 2 accounts < / o p t i o n >
< option value = "3" > 3 accounts < / o p t i o n >
< option value = "4" > 4 accounts < / o p t i o n >
< option value = "5" > 5 accounts < / o p t i o n >
< option value = "6" > 6 accounts < / o p t i o n >
< option value = "7" > 7 accounts < / o p t i o n >
< option value = "8" > 8 accounts < / o p t i o n >
< option value = "9" > 9 accounts < / o p t i o n >
< option value = "10" > 10 accounts < / o p t i o n >
< / s e l e c t >
< / d i v >
< div className = "col-sm-2 no-padding-left text-center margin-top-10" >
< select
className = "form-control form-material"
name = "addressdepth"
value = { this . state . addressdepth }
onChange = { ( event ) => this . updateInput ( event ) }
autoFocus >
< option value = "20" > 20 addresses < / o p t i o n >
< option value = "30" > 30 addresses < / o p t i o n >
< option value = "40" > 40 addresses < / o p t i o n >
< option value = "50" > 50 addresses < / o p t i o n >
< option value = "60" > 60 addresses < / o p t i o n >
< option value = "70" > 70 addresses < / o p t i o n >
< option value = "80" > 80 addresses < / o p t i o n >
< option value = "90" > 90 addresses < / o p t i o n >
< option value = "100" > 100 addresses < / o p t i o n >
< / s e l e c t >
< / d i v >
< / d i v >
< / d i v >
{ this . state . keys &&