on master help sign in
Support flagging for discontinuity
31b6cc0Fang
src/bridge/views/SetKeys.js+18−3
@@ -2,7 +2,7 @@ import React from 'react'
2import Maybe from 'folktale/maybe'
2import Maybe from 'folktale/maybe'
3import * as azimuth from 'azimuth-js'
3import * as azimuth from 'azimuth-js'
4import * as ob from 'urbit-ob'
4import * 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'
6
6
7import StatelessTransaction from '../components/StatelessTransaction'
7import StatelessTransaction from '../components/StatelessTransaction'
8import { BRIDGE_ERROR } from '../lib/error'
8import { BRIDGE_ERROR } from '../lib/error'
@@ -33,14 +33,19 @@ class SetKeys extends React.Component {
33 nondeterministicSeed: false,
33 nondeterministicSeed: false,
34 point: point,
34 point: point,
35 cryptoSuiteVersion: 1,
35 cryptoSuiteVersion: 1,
36− continuity: false,
36+ discontinuity: false,
37 isManagementSeed: false,
37 isManagementSeed: false,
38 }
38 }
39
39
40+ this.toggleDiscontinuity = this.toggleDiscontinuity.bind(this);
40 // Transaction
41 // Transaction
41 this.createUnsignedTxn = this.createUnsignedTxn.bind(this)
42 this.createUnsignedTxn = this.createUnsignedTxn.bind(this)
42 }
43 }
43
44
45+ toggleDiscontinuity() {
46+ this.setState({ discontinuity: !this.state.discontinuity });
47+ }
48+
44 componentDidMount() {
49 componentDidMount() {
45 const { props } = this
50 const { props } = this
46
51
@@ -125,7 +130,7 @@ class SetKeys extends React.Component {
125 pencr,
130 pencr,
126 pauth,
131 pauth,
127 1,
132 1,
128− false
133+ state.discontinuity
129 )
134 )
130
135
131 return Maybe.Just(txn)
136 return Maybe.Just(txn)
@@ -180,6 +185,16 @@ class SetKeys extends React.Component {
180 </Warning>
185 </Warning>
181 : <div /> }
186 : <div /> }
182
187
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+
183 <StatelessTransaction
198 <StatelessTransaction
184 // Upper scope
199 // Upper scope
185 web3={props.web3}
200 web3={props.web3}