on master help sign in
Support flagging for discontinuity

Closes #25.

commit31b6cc0e46bd7e4008c254abede23b586d857433 authorFang <git@fang.io> dateWed 1 May 2019, 21:13 (8 years ago) parenta0565ac
1 file changed+18−3
src/bridge/views/SetKeys.js+18−3
src/bridge/views/SetKeys.js+18−3
@@ -2,7 +2,7 @@ import React from 'react'
22import Maybe from 'folktale/maybe'
33import * as azimuth from 'azimuth-js'
44import * as ob from 'urbit-ob'
5−import { Row, Col, H1, P, Warning } from '../components/Base'
5+import { Row, Col, H1, P, Warning, CheckboxButton } from '../components/Base'
66
77import StatelessTransaction from '../components/StatelessTransaction'
88import { BRIDGE_ERROR } from '../lib/error'
@@ -33,14 +33,19 @@ class SetKeys extends React.Component {
3333 nondeterministicSeed: false,
3434 point: point,
3535 cryptoSuiteVersion: 1,
36− continuity: false,
36+ discontinuity: false,
3737 isManagementSeed: false,
3838 }
3939
40+ this.toggleDiscontinuity = this.toggleDiscontinuity.bind(this);
4041 // Transaction
4142 this.createUnsignedTxn = this.createUnsignedTxn.bind(this)
4243 }
4344
45+ toggleDiscontinuity() {
46+ this.setState({ discontinuity: !this.state.discontinuity });
47+ }
48+
4449 componentDidMount() {
4550 const { props } = this
4651
@@ -125,7 +130,7 @@ class SetKeys extends React.Component {
125130 pencr,
126131 pauth,
127132 1,
128− false
133+ state.discontinuity
129134 )
130135
131136 return Maybe.Just(txn)
@@ -180,6 +185,16 @@ class SetKeys extends React.Component {
180185 </Warning>
181186 : <div /> }
182187
188+ <CheckboxButton
189+ className='mt-8'
190+ onClick={ this.toggleDiscontinuity }
191+ state={ state.discontinuity }
192+ >
193+ <div style={{cursor: 'pointer'}} onClick={ this.toggleDiscontinuity }>
194+ { 'I have lost important off-chain data relating to this point and need to do a hard-reset. (For example, rebooting an Arvo ship.)' }
195+ </div>
196+ </CheckboxButton>
197+
183198 <StatelessTransaction
184199 // Upper scope
185200 web3={props.web3}