on master help sign in
- Add copy to genKeyfile page, instructing you to set networking keys if they haven’t been set in this session

- Remove networkSeed inputs on genKeyfile/setKeys pages

commit23dbfee7fc22847ad3b819acc04619f6606fe0c2 authorChris Johnson <chris@cjohnson.io> dateThu 21 Mar 2019, 15:57 (8 years ago) parent5f71b99
2 files changed+25−48
src/views/GenKeyfile.js+18−26 src/views/SetKeys.js+7−22
src/views/GenKeyfile.js+18−26
@@ -107,6 +107,17 @@ class GenKeyfile extends React.Component {
107107 </Button>
108108 : ''
109109
110+ let networkSeedWarning
111+
112+ if (this.state.networkSeed === '') {
113+ networkSeedWarning = (
114+ <P>
115+ <b>Warning: </b>
116+ { "No network seed detected. To generate a keyfile, you must reset your networking keys." }
117+ </P>
118+ )
119+ }
120+
110121 return (
111122 <Row>
112123 <Col className={'col-md-8'}>
@@ -116,33 +127,12 @@ class GenKeyfile extends React.Component {
116127 { "Generate a private key file for booting this point in Arvo." }
117128 </P>
118129
119− <P>
120− {
121− `Enter a network seed below for generating your key file. Your
122− network seed must be a string of 64 characters (containing 0-9, A-Z, a-z)`
123− }
124− </P>
125− <P>
126− {
127− `If you've authenticated with either a master ticket or a
128− management proxy mnemonic, a seed will be generated for you
129− automatically.`
130− }
131− </P>
132−
133− <RequiredInput
134− className='mono'
135− prop-size='lg'
136− prop-format='innerLabel'
137− autoFocus
138− value={ networkSeed }
139− onChange={ this.handleNetworkSeedInput }>
140− <InnerLabel>{ 'Network seed' }</InnerLabel>
141− </RequiredInput>
130+ { networkSeedWarning }
142131
143132 <Button
144133 className={'mt-8'}
145134 color={'blue'}
135+ disabled={this.state.networkSeed === ''}
146136 onClick={
147137 () => {
148138 if (hexRegExp.test(networkSeed)) {
@@ -155,9 +145,11 @@ class GenKeyfile extends React.Component {
155145 { 'Generate →' }
156146 </Button>
157147
158− <Code>
159− { keyfile }
160− </Code>
148+ { keyfile !== '' &&
149+ <Code className="pb-5">
150+ { keyfile }
151+ </Code>
152+ }
161153
162154 { warning }
163155
src/views/SetKeys.js+7−22
@@ -335,16 +335,6 @@ class SetKeys extends React.Component {
335335 ? props.pointCache[state.point]
336336 : (() => { throw BRIDGE_ERROR.MISSING_POINT })()
337337
338− const isManagementMnemonic =
339− this.state.isManagementSeed &&
340− props.walletType === WALLET_NAMES.MNEMONIC
341−
342− const isMasterTicket =
343− props.walletType === WALLET_NAMES.TICKET ||
344− props.walletType === WALLET_NAMES.SHARD
345−
346− const networkSeedDisabled = isManagementMnemonic || isMasterTicket;
347−
348338 return (
349339 <Row>
350340 <Col>
@@ -352,9 +342,15 @@ class SetKeys extends React.Component {
352342 { 'Set Network Keys For ' } <code>{ `${ob.patp(state.point)}` }</code>
353343 </H1>
354344
345+ <P className="mt-10">
346+ {
347+ `Set new authentication and encryption keys for your Arvo ship.`
348+ }
349+ </P>
350+
355351 <P>
356352 {
357− `Set new authentication and encryption keys for your Arvo ship. Once the transaction is sent, a keyfile will be downloaded, enabling you to instantiate your ship on the network.`
353+ `Once the transaction is sent, a keyfile will be downloaded, enabling you to instantiate your ship on the network.`
358354 }
359355 </P>
360356
@@ -368,17 +364,6 @@ class SetKeys extends React.Component {
368364 </Warning>
369365 : <div /> }
370366
371− <RequiredInput
372− className='mono'
373− prop-size='lg'
374− prop-format='innerLabel'
375− autoFocus
376− disabled= { networkSeedDisabled }
377− value={ state.networkSeed }
378− onChange={ this.handleNetworkSeedInput }>
379− <InnerLabel>{ 'Network seed' }</InnerLabel>
380− </RequiredInput>
381−
382367 <StatelessTransaction
383368 // Upper scope
384369 web3={props.web3}