on master help sign in
Merge branch 'master' into mino-onboarding-invites
commit696403afef3c2145dfa5ebf32f1a49a33419130e authorFang <git@fang.io> dateTue 28 May 2019, 22:28 (7 years ago) parentb3b0ff4cb2d061
10 files changed+99−22
CHANGELOG+15 package-lock.json+48−1 package.json+1−1 src/bridge/Bridge.js+5−2 src/bridge/components/CheckboxButton.js+3−1 src/bridge/components/StatelessTransaction.js+3−6 src/bridge/views/GenKeyfile.js+4−1 src/bridge/views/Point/Actions.js+1−1 src/bridge/views/Points.js+1−1 src/bridge/views/SetKeys.js+18−8
CHANGELOG+15
@@ -1,6 +1,21 @@
11
22# Changelog
33
4+- 1.4.1 (2019-05-17)
5+ This release fixes two issues.
6+
7+ * After setting keys, always generate the corresponding keyfile (#138)
8+ * Ship with latest azimuth-js to support updates "Issue Child" page (#138)
9+
10+- 1.4.0 (2019-05-15)
11+ This release adds support for discontinuity flagging (aka "personal breach") and brings a couple quality of life improvements.
12+
13+ * Support flagging for discontinuity during key configuration (#130)
14+ * Autocomplete available ship names on the "Issue Child" page (#128)
15+ * Implement explicit "unset" action for proxy addresses (#127)
16+ * Make it easier to select Ledger accounts (#129)
17+ * Various smaller code improvements (#126, #131, #133, #134)
18+
419- 1.3.1 (2019-04-23)
520 This release fixes an issue with the script for serving Bridge over HTTPS.
621
package-lock.json+48−1
@@ -1,6 +1,6 @@
11{
22 "name": "bridge",
3− "version": "1.3.1",
3+ "version": "1.4.0",
44 "lockfileVersion": 1,
55 "requires": true,
66 "dependencies": {
@@ -2000,6 +2000,28 @@
20002000 "requires": {
20012001 "azimuth-solidity": "1.1.0",
20022002 "ethereumjs-util": "^5.2.0"
2003+<<<<<<< HEAD
2004+=======
2005+ },
2006+ "dependencies": {
2007+ "azimuth-solidity": {
2008+ "version": "1.1.0",
2009+ "resolved": "https://registry.npmjs.org/azimuth-solidity/-/azimuth-solidity-1.1.0.tgz",
2010+ "integrity": "sha512-YhVWKql1ZZ9Zae96nYA7QLwQlTzGspkNOErq170sl/UJwncQbvAyibSv+heMaS18n4soPDiRSpa1vHFoGoIX1A==",
2011+ "requires": {
2012+ "babel-polyfill": "^6.26.0",
2013+ "babel-register": "^6.26.0",
2014+ "openzeppelin-solidity": "1.12.0",
2015+ "truffle": "4.1.11"
2016+ },
2017+ "dependencies": {
2018+ "openzeppelin-solidity": {
2019+ "version": "1.12.0",
2020+ "bundled": true
2021+ }
2022+ }
2023+ }
2024+>>>>>>> master
20032025 }
20042026 },
20052027 "azimuth-solidity": {
@@ -20139,6 +20161,7 @@
2013920161 "resolved": "https://registry.npmjs.org/web3-providers/-/web3-providers-1.0.0-beta.54.tgz",
2014020162 "integrity": "sha512-P55MQHkfU2VLt3t+3IbqRUVwOziLOMiXxKulVYXzTu9M8p9aogl1tvPjKXpRUGygCY3LsWTpt/UlJR8Aaia+CQ==",
2014120163 "requires": {
20164+<<<<<<< HEAD
2014220165 "@babel/runtime": "^7.3.1",
2014320166 "@types/node": "^10.12.18",
2014420167 "eventemitter3": "3.1.0",
@@ -20161,6 +20184,30 @@
2016120184 "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz",
2016220185 "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA=="
2016320186 }
20187+=======
20188+ "web3-core-helpers": "1.0.0-beta.33",
20189+ "xhr2": "0.1.4"
20190+ }
20191+ },
20192+ "web3-providers-ipc": {
20193+ "version": "1.0.0-beta.33",
20194+ "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.0.0-beta.33.tgz",
20195+ "integrity": "sha1-Twrcmv6dEsBm5L5cPFNvUHPLB8Y=",
20196+ "requires": {
20197+ "oboe": "2.1.3",
20198+ "underscore": "1.8.3",
20199+ "web3-core-helpers": "1.0.0-beta.33"
20200+ }
20201+ },
20202+ "web3-providers-ws": {
20203+ "version": "1.0.0-beta.33",
20204+ "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.0.0-beta.33.tgz",
20205+ "integrity": "sha1-j93qQuGbvyUh7IeVRkV6Yjqdye8=",
20206+ "requires": {
20207+ "underscore": "1.8.3",
20208+ "web3-core-helpers": "1.0.0-beta.33",
20209+ "websocket": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible"
20210+>>>>>>> master
2016420211 }
2016520212 },
2016620213 "web3-shh": {
package.json+1−1
@@ -1,6 +1,6 @@
11{
22 "name": "bridge",
3− "version": "1.3.1",
3+ "version": "1.4.1",
44 "description": "An application for interacting with Azimuth",
55 "repository": {
66 "type": "git",
src/bridge/Bridge.js+5−2
@@ -187,9 +187,10 @@ class Bridge extends React.Component {
187187 }
188188 }
189189
190− setNetworkSeedCache(networkSeed) {
190+ setNetworkSeedCache(networkSeed, revision) {
191191 this.setState({
192− networkSeedCache: networkSeed
192+ networkSeedCache: networkSeed,
193+ networkRevisionCache: revision
193194 })
194195 }
195196
@@ -270,6 +271,7 @@ class Bridge extends React.Component {
270271 urbitWallet,
271272 authMnemonic,
272273 networkSeedCache,
274+ networkRevisionCache,
273275 pointCursor,
274276 pointCache,
275277 txnHashCursor,
@@ -337,6 +339,7 @@ class Bridge extends React.Component {
337339 pointCursor={ pointCursor }
338340 pointCache={ pointCache }
339341 networkSeedCache= { networkSeedCache }
342+ networkRevisionCache={ networkRevisionCache }
340343 setNetworkSeedCache= { this.setNetworkSeedCache }
341344 // txn
342345 setTxnHashCursor={ this.setTxnHashCursor }
src/bridge/components/CheckboxButton.js+3−1
@@ -16,7 +16,8 @@ const CheckboxButton = props => {
1616 return (
1717 <div
1818 className={`flex items-center ${props.className}`}
19− style={props.style}>
19+ style={{cursor: 'pointer', ...props.style}}
20+ onClick={props.onToggle}>
2021
2122 <ProtoButton
2223 // {...getDomProps(props)}
@@ -38,6 +39,7 @@ const CheckboxButton = props => {
3839
3940 </ProtoButton>
4041
42+ <div>{ props.label }</div>
4143 { props.children }
4244
4345 </div>
src/bridge/components/StatelessTransaction.js+3−6
@@ -515,13 +515,10 @@ class StatelessTransaction extends React.Component {
515515 <CheckboxButton
516516 className={ 'mt-8' }
517517 disabled={ !canApprove }
518− onClick={ setUserApproval }
518+ onToggle={ setUserApproval }
519519 state={ userApproval }
520− >
521− <div onClick={ setUserApproval }>
522− { `I approve this transaction and wish to send.` }
523− </div>
524− </CheckboxButton>
520+ label='I approve this transaction and wish to send.'
521+ ></CheckboxButton>
525522
526523 const sending = (txStatus !== SUBMISSION_STATES.PROMPT);
527524 const sendTxnSpinner = sending ? '' : 'hide';
src/bridge/views/GenKeyfile.js+4−1
@@ -40,7 +40,10 @@ class GenKeyfile extends React.Component {
4040 ? pointCache[point]
4141 : (() => { throw BRIDGE_ERROR.MISSING_POINT })()
4242
43− const revision = parseInt(pointDetails.keyRevisionNumber)
43+ // in case we did SetKeys earlier this session, make sure to generate the
44+ // newer keyfile, rather than the one that will expire soon
45+ const revision = (this.props.networkRevisionCache ||
46+ parseInt(pointDetails.keyRevisionNumber));
4447
4548 return {
4649 point,
src/bridge/views/Point/Actions.js+1−1
@@ -237,7 +237,7 @@ const Actions = (props) => {
237237 pushRoute(ROUTE_NAMES.SET_KEYS)
238238 }}
239239 >
240− { 'Set public keys' }
240+ { 'Set network keys' }
241241 </Button>
242242
243243 <Button
src/bridge/views/Points.js+1−1
@@ -168,7 +168,7 @@ class Points extends React.Component {
168168 ? <React.Fragment>
169169 <H2>{ 'You Are a Management Proxy For' }</H2>
170170 <P>
171− { `You can configure or set public keys and conduct sponsorship
171+ { `You can configure or set network keys and conduct sponsorship
172172 related operations for these points.` }
173173 </P>
174174 <PointList
src/bridge/views/SetKeys.js+18−8
@@ -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,15 +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.handleNetworkSeedInput = this.handleNetworkSeedInput.bind(this)
40+ this.toggleDiscontinuity = this.toggleDiscontinuity.bind(this);
4141 // Transaction
4242 this.createUnsignedTxn = this.createUnsignedTxn.bind(this)
4343 }
4444
45+ toggleDiscontinuity() {
46+ this.setState({ discontinuity: !this.state.discontinuity });
47+ }
48+
4549 componentDidMount() {
4650 const { props } = this
4751
@@ -94,10 +98,6 @@ class SetKeys extends React.Component {
9498 })
9599 }
96100
97− handleNetworkSeedInput(networkSeed) {
98− this.setState({ networkSeed })
99− }
100−
101101 createUnsignedTxn() {
102102 const { state, props } = this
103103
@@ -130,7 +130,7 @@ class SetKeys extends React.Component {
130130 pencr,
131131 pauth,
132132 1,
133− false
133+ state.discontinuity
134134 )
135135
136136 return Maybe.Just(txn)
@@ -185,6 +185,15 @@ class SetKeys extends React.Component {
185185 </Warning>
186186 : <div /> }
187187
188+ <CheckboxButton
189+ className='mt-8'
190+ onToggle={ this.toggleDiscontinuity }
191+ state={ state.discontinuity }
192+ label={`I have lost important off-chain data relating to this point
193+ and need to do a hard reset.
194+ (For example, rebooting an Arvo ship.)`}
195+ ></CheckboxButton>
196+
188197 <StatelessTransaction
189198 // Upper scope
190199 web3={props.web3}
@@ -201,6 +210,7 @@ class SetKeys extends React.Component {
201210 canGenerate={ canGenerate }
202211 createUnsignedTxn={this.createUnsignedTxn}
203212 networkSeed={ state.networkSeed }
213+ newRevision={ (parseInt(pointDetails.keyRevisionNumber) + 1) }
204214 setNetworkSeedCache={ props.setNetworkSeedCache } />
205215
206216 </Col>