on master help sign in
- Fixed ESLint warnings
e9ed0d2Chris Johnson
src/index.js+1−1
@@ -3,7 +3,7 @@ import 'babel-polyfill' // required for @ledgerhq/hw-transport-u2f
3import React from 'react'
3import React from 'react'
4import ReactDOM from 'react-dom'
4import ReactDOM from 'react-dom'
5
5
6−import Bridge from './Bridge'
6+// import Bridge from './Bridge'
7import Walletgen from './walletgen/Walletgen'
7import Walletgen from './walletgen/Walletgen'
8
8
9import './style/index.css'
9import './style/index.css'
src/walletgen/Walletgen.js+1−3
@@ -6,8 +6,6 @@ import Footer from './components/Footer'
6
6
7import { NETWORK_STATES, PROFILE_STATES, GEN_STATES } from './lib/constants'
7import { NETWORK_STATES, PROFILE_STATES, GEN_STATES } from './lib/constants'
8
8
9−import BrowserWarning from './views/BrowserWarning'
10−import NetworkWarning from './views/NetworkWarning'
11import PrivacyPolicy from './views/PrivacyPolicy'
9import PrivacyPolicy from './views/PrivacyPolicy'
12import Welcome from './views/Welcome'
10import Welcome from './views/Welcome'
13import Eula from './views/Eula'
11import Eula from './views/Eula'
@@ -117,7 +115,7 @@ class Walletgen extends React.Component {
117
115
118
116
119 render() {
117 render() {
120− const { network, route, currentStep, stepCount, lastRoute } = this.state;
118+ const { network, route, currentStep, lastRoute } = this.state;
121
119
122 const routed = this.router(network, route) // hacky prod
120 const routed = this.router(network, route) // hacky prod
123 // const routed = this.router(NETWORK_STATES.OFFLINE, true, route) // hacky dev
121 // const routed = this.router(NETWORK_STATES.OFFLINE, true, route) // hacky dev
src/walletgen/components/Header.js−1
@@ -1,5 +1,4 @@
1import React from 'react'
1import React from 'react'
2−import { map } from 'lodash'
3import { seq } from '../lib/lib'
2import { seq } from '../lib/lib'
4
3
5import { NETWORK_STATES } from '../lib/constants'
4import { NETWORK_STATES } from '../lib/constants'
src/walletgen/views/Done.js−10
@@ -1,17 +1,7 @@
1import React from 'react'
1import React from 'react'
2
2
3−import Button from '../components/Button'
4−import CheckBox from '../components/CheckBox'
5−
6class Done extends React.Component {
3class Done extends React.Component {
7 render() {
4 render() {
8−
9− const { setGlobalState, understand } = this.props
10−
11− const nextButtonClass = understand
12− ? 'btn btn-primary'
13− : 'btn shape-gray-10'
14−
15 return(
5 return(
16 <div className={'col-md-7'}>
6 <div className={'col-md-7'}>
17
7
src/walletgen/views/Download.js−7
@@ -9,12 +9,6 @@ import CheckBox from '../components/CheckBox'
9const NEXT_STEP_NUM = 7;
9const NEXT_STEP_NUM = 7;
10
10
11class Download extends React.Component {
11class Download extends React.Component {
12−
13− constructor(props) {
14− super(props)
15− // this.handleSave = this.handleSave.bind(this)
16− }
17−
18 handleSave = (event) => {
12 handleSave = (event) => {
19 const { props } = this
13 const { props } = this
20
14
@@ -84,7 +78,6 @@ class Download extends React.Component {
84
78
85 const { props } = this
79 const { props } = this
86
80
87− const wallets = props['wallets.value']
88 const downloaded = props['downloaded']
81 const downloaded = props['downloaded']
89 const didClickDownload = props['didClickDownload']
82 const didClickDownload = props['didClickDownload']
90
83
src/walletgen/views/EulaView.js−3
@@ -3,9 +3,6 @@ import React from 'react'
3import EulaText from '../components/EulaText'
3import EulaText from '../components/EulaText'
4import Button from '../components/Button'
4import Button from '../components/Button'
5
5
6−const NEXT_STEP_NUM = 2
7−
8−
9class EulaView extends React.Component {
6class EulaView extends React.Component {
10 render() {
7 render() {
11 let { setGlobalState, lastRoute } = this.props;
8 let { setGlobalState, lastRoute } = this.props;
src/walletgen/views/Generate.js+3−3
@@ -292,7 +292,7 @@ class Generate extends React.Component {
292 throw new Error('no ship information provided')
292 throw new Error('no ship information provided')
293 } else {
293 } else {
294 let throwawayEntry = enyTable[0]
294 let throwawayEntry = enyTable[0]
295− // eslint-disable-next-lines
295+ // eslint-disable-next-line
296 let throwaway = await genWallet(throwawayEntry.ship, throwawayEntry.ticket, () => {})
296 let throwaway = await genWallet(throwawayEntry.ship, throwawayEntry.ticket, () => {})
297 };
297 };
298 }
298 }
@@ -380,8 +380,8 @@ class Generate extends React.Component {
380 };
380 };
381
381
382 const getGenButtonText = () => {
382 const getGenButtonText = () => {
383− const N = props['wallets.genCounter'] + 1;
383+ // const N = props['wallets.genCounter'] + 1;
384− const X = props['eny.value'].length;
384+ // const X = props['eny.value'].length;
385 let r = '';
385 let r = '';
386 if (NONE_START === true) r = 'Generate All';
386 if (NONE_START === true) r = 'Generate All';
387 if (es === ENY_PENDING) r = 'Generating Entropy';
387 if (es === ENY_PENDING) r = 'Generating Entropy';
src/walletgen/views/Upload.js+49−55
@@ -1,11 +1,6 @@
1import React, { Component } from 'react'
1import React, { Component } from 'react'
2−import * as lodash from 'lodash'
3−import * as sigil from 'sigil-js'
4−import ob from 'urbit-ob'
5
2
6import Button from '../components/Button'
3import Button from '../components/Button'
7−import InputBox from '../components/InputBox'
8−import ReactSVGComponents from '../components/ReactSVGComponents'
9import UploadButton from '../components/UploadButton'
4import UploadButton from '../components/UploadButton'
10
5
11import { compose } from '../lib/lib'
6import { compose } from '../lib/lib'
@@ -80,50 +75,49 @@ const validateObject = ({ data, pass, error }) => {
80 return { data: data, pass: didPass, error: err }
75 return { data: data, pass: didPass, error: err }
81}
76}
82
77
83−
84−const preview = ship => {
78+// const preview = ship => {
85− const name = ob.patp(ship)
79+// const name = ob.patp(ship)
86− const sig = sigil.pour({
80+// const sig = sigil.pour({
87− patp: name,
81+// patp: name,
88− colorway: ['black', 'white'],
82+// colorway: ['black', 'white'],
89− renderer: ReactSVGComponents,
83+// renderer: ReactSVGComponents,
90− size: 64
84+// size: 64
91− })
85+// })
92−
86+//
93− return (
87+// return (
94− <div className={'col-md-8'}>
88+// <div className={'col-md-8'}>
95− <div className={'flex items-center bg-white black'} key={ ship }>
89+// <div className={'flex items-center bg-white black'} key={ ship }>
96− <div className={'col-md-5 pt-2 pl-5'}>
90+// <div className={'col-md-5 pt-2 pl-5'}>
97− { sig }
91+// { sig }
98− </div>
92+// </div>
99− <div className={'col-md-5'}>
93+// <div className={'col-md-5'}>
100− <h4 className={'text-mono text-500 mb-0'}>
94+// <h4 className={'text-mono text-500 mb-0'}>
101− { name }
95+// { name }
102− </h4>
96+// </h4>
103− </div>
97+// </div>
104− </div>
98+// </div>
105− </div>
99+// </div>
106 // <div className={'flex h-16 w-60 bg-white black items-center'} key={ ship }>
100 // <div className={'flex h-16 w-60 bg-white black items-center'} key={ ship }>
107 // { sig }
101 // { sig }
108 // <div className={'pl-4 text-mono text-500'}>
102 // <div className={'pl-4 text-mono text-500'}>
109 // { name }
103 // { name }
110 // </div>
104 // </div>
111 // </div>
105 // </div>
112− )
106+// )
113−}
107+// }
114−
108+
115−const shipList = profile => {
109+// const shipList = profile => {
116− const ships = Object.keys(profile)
110+// const ships = Object.keys(profile)
117− return(
111+// return(
118− <div>
112+// <div>
119− <h2>Total Ships: { ships.length }</h2>
113+// <h2>Total Ships: { ships.length }</h2>
120−
114+//
121− <div className={''}>
115+// <div className={''}>
122− { ships.map(preview) }
116+// { ships.map(preview) }
123− </div>
117+// </div>
124− </div>
118+// </div>
125− )
119+// )
126−}
120+// }
127
121
128class Upload extends Component {
122class Upload extends Component {
129 constructor(props) {
123 constructor(props) {
@@ -242,17 +236,17 @@ class Upload extends Component {
242 }
236 }
243}
237}
244
238
245−const ShipList = (ships, title) => {
239+// const ShipList = (ships, title) => {
246− if (ships.length > 0) {
240+// if (ships.length > 0) {
247− return (
241+// return (
248− <div>
242+// <div>
249− <h2>{ title }</h2>
243+// <h2>{ title }</h2>
250− { ships.map(ship => preview(ship)) }
244+// { ships.map(ship => preview(ship)) }
251− </div>
245+// </div>
252− )
246+// )
253− } else {
247+// } else {
254− return <div />
248+// return <div />
255− }
249+// }
256−}
250+// }
257
251
258export default Upload
252export default Upload