on master help sign in
- Added warning for nondeterministic keys to download your keyfile in this session.
17b7424Chris Johnson
src/views/SetKeys.js+14−8
@@ -41,6 +41,7 @@ class SetKeys extends React.Component {
41 auth: '',
41 auth: '',
42 encr: '',
42 encr: '',
43 networkSeed: '',
43 networkSeed: '',
44+ nondeterministicSeed: false,
44 point: point,
45 point: point,
45 cryptoSuiteVersion: 1,
46 cryptoSuiteVersion: 1,
46 continuity: false,
47 continuity: false,
@@ -139,13 +140,16 @@ class SetKeys extends React.Component {
139 async deriveSeed() {
140 async deriveSeed() {
140 const next = true
141 const next = true
141 let seed = await attemptSeedDerivation(next, this.props)
142 let seed = await attemptSeedDerivation(next, this.props)
143+ let nondeterministicSeed = false;
142
144
143 if (seed.getOrElse('') === '') {
145 if (seed.getOrElse('') === '') {
144 seed = Maybe.Just(this.randomHex(64));
146 seed = Maybe.Just(this.randomHex(64));
147+ nondeterministicSeed = true;
145 }
148 }
146
149
147 this.setState({
150 this.setState({
148− networkSeed: seed.getOrElse('')
151+ networkSeed: seed.getOrElse(''),
152+ nondeterministicSeed: nondeterministicSeed
149 })
153 })
150 }
154 }
151
155
@@ -264,7 +268,6 @@ class SetKeys extends React.Component {
264 sendSignedTransaction(props.web3.value, state.stx)
268 sendSignedTransaction(props.web3.value, state.stx)
265 .then(sent => {
269 .then(sent => {
266 props.setNetworkSeedCache(this.state.networkSeed)
270 props.setNetworkSeedCache(this.state.networkSeed)
267− // this.downloadKeyfile(this.state.networkSeed)
268 props.setTxnHashCursor(sent)
271 props.setTxnHashCursor(sent)
269 props.popRoute()
272 props.popRoute()
270 props.pushRoute(ROUTE_NAMES.SENT_TRANSACTION)
273 props.pushRoute(ROUTE_NAMES.SENT_TRANSACTION)
@@ -274,8 +277,6 @@ class SetKeys extends React.Component {
274 })
277 })
275 }
278 }
276
279
277−
278−
279 createUnsignedTxn() {
280 createUnsignedTxn() {
280 const { state, props } = this
281 const { state, props } = this
281
282
@@ -349,11 +350,16 @@ class SetKeys extends React.Component {
349 }
350 }
350 </P>
351 </P>
351
352
352− <P>
353+ { state.nondeterministicSeed &&
354+ <Warning>
355+ <h3 className={'mb-2'}>{'Warning'}</h3>
353− {
356+ {
354− `Once the transaction is sent, please generate your Arvo keyfile immediately.`
357+ `Your network seed could not be derived automatically. We've
358+ generated a random one for you, but you must download your Arvo
359+ keyfile during this session after setting your keys.`
360+ }
361+ </Warning>
355 }
362 }
356− </P>
357
363
358 { pointDetails.keyRevisionNumber === '0'
364 { pointDetails.keyRevisionNumber === '0'
359 ? <Warning>
365 ? <Warning>