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
23dbfeeChris Johnson
src/views/GenKeyfile.js+18−26
@@ -107,6 +107,17 @@ class GenKeyfile extends React.Component {
107 </Button>
107 </Button>
108 : ''
108 : ''
109
109
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+
110 return (
121 return (
111 <Row>
122 <Row>
112 <Col className={'col-md-8'}>
123 <Col className={'col-md-8'}>
@@ -116,33 +127,12 @@ class GenKeyfile extends React.Component {
116 { "Generate a private key file for booting this point in Arvo." }
127 { "Generate a private key file for booting this point in Arvo." }
117 </P>
128 </P>
118
129
119− <P>
130+ { networkSeedWarning }
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>
142
131
143 <Button
132 <Button
144 className={'mt-8'}
133 className={'mt-8'}
145 color={'blue'}
134 color={'blue'}
135+ disabled={this.state.networkSeed === ''}
146 onClick={
136 onClick={
147 () => {
137 () => {
148 if (hexRegExp.test(networkSeed)) {
138 if (hexRegExp.test(networkSeed)) {
@@ -155,9 +145,11 @@ class GenKeyfile extends React.Component {
155 { 'Generate →' }
145 { 'Generate →' }
156 </Button>
146 </Button>
157
147
148+ { keyfile !== '' &&
158− <Code>
149+ <Code className="pb-5">
159− { keyfile }
150+ { keyfile }
160− </Code>
151+ </Code>
152+ }
161
153
162 { warning }
154 { warning }
163
155
src/views/SetKeys.js+7−22
@@ -335,16 +335,6 @@ class SetKeys extends React.Component {
335 ? props.pointCache[state.point]
335 ? props.pointCache[state.point]
336 : (() => { throw BRIDGE_ERROR.MISSING_POINT })()
336 : (() => { throw BRIDGE_ERROR.MISSING_POINT })()
337
337
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−
348 return (
338 return (
349 <Row>
339 <Row>
350 <Col>
340 <Col>
@@ -352,9 +342,15 @@ class SetKeys extends React.Component {
352 { 'Set Network Keys For ' } <code>{ `${ob.patp(state.point)}` }</code>
342 { 'Set Network Keys For ' } <code>{ `${ob.patp(state.point)}` }</code>
353 </H1>
343 </H1>
354
344
345+ <P className="mt-10">
346+ {
347+ `Set new authentication and encryption keys for your Arvo ship.`
348+ }
349+ </P>
350+
355 <P>
351 <P>
356 {
352 {
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.`
358 }
354 }
359 </P>
355 </P>
360
356
@@ -368,17 +364,6 @@ class SetKeys extends React.Component {
368 </Warning>
364 </Warning>
369 : <div /> }
365 : <div /> }
370
366
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−
382 <StatelessTransaction
367 <StatelessTransaction
383 // Upper scope
368 // Upper scope
384 web3={props.web3}
369 web3={props.web3}