on master help sign in
- Added warning for nondeterministic keys to download your keyfile in this session.
commit17b74241338bc080cbc8d35bebfaf158c130159d authorChris Johnson <chris@cjohnson.io> dateFri 29 Mar 2019, 12:47 (8 years ago) parent6952d2f
1 file changed+14−8
src/views/SetKeys.js+14−8
src/views/SetKeys.js+14−8
@@ -41,6 +41,7 @@ class SetKeys extends React.Component {
4141 auth: '',
4242 encr: '',
4343 networkSeed: '',
44+ nondeterministicSeed: false,
4445 point: point,
4546 cryptoSuiteVersion: 1,
4647 continuity: false,
@@ -139,13 +140,16 @@ class SetKeys extends React.Component {
139140 async deriveSeed() {
140141 const next = true
141142 let seed = await attemptSeedDerivation(next, this.props)
143+ let nondeterministicSeed = false;
142144
143145 if (seed.getOrElse('') === '') {
144146 seed = Maybe.Just(this.randomHex(64));
147+ nondeterministicSeed = true;
145148 }
146149
147150 this.setState({
148− networkSeed: seed.getOrElse('')
151+ networkSeed: seed.getOrElse(''),
152+ nondeterministicSeed: nondeterministicSeed
149153 })
150154 }
151155
@@ -264,7 +268,6 @@ class SetKeys extends React.Component {
264268 sendSignedTransaction(props.web3.value, state.stx)
265269 .then(sent => {
266270 props.setNetworkSeedCache(this.state.networkSeed)
267− // this.downloadKeyfile(this.state.networkSeed)
268271 props.setTxnHashCursor(sent)
269272 props.popRoute()
270273 props.pushRoute(ROUTE_NAMES.SENT_TRANSACTION)
@@ -274,8 +277,6 @@ class SetKeys extends React.Component {
274277 })
275278 }
276279
277−
278−
279280 createUnsignedTxn() {
280281 const { state, props } = this
281282
@@ -349,11 +350,16 @@ class SetKeys extends React.Component {
349350 }
350351 </P>
351352
352− <P>
353− {
354− `Once the transaction is sent, please generate your Arvo keyfile immediately.`
353+ { state.nondeterministicSeed &&
354+ <Warning>
355+ <h3 className={'mb-2'}>{'Warning'}</h3>
356+ {
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>
355362 }
356− </P>
357363
358364 { pointDetails.keyRevisionNumber === '0'
359365 ? <Warning>