on master help sign in
- Fixed ESLint warnings
commite9ed0d25d172cb9a8ead6defb501c00952699ed0 authorChris Johnson <chris@cjohnson.io> dateSun 3 Mar 2019, 07:57 (8 years ago) parentdb15cc5
8 files changed+54−83
src/index.js+1−1 src/walletgen/Walletgen.js+1−3 src/walletgen/components/Header.js−1 src/walletgen/views/Done.js−10 src/walletgen/views/Download.js−7 src/walletgen/views/EulaView.js−3 src/walletgen/views/Generate.js+3−3 src/walletgen/views/Upload.js+49−55
src/index.js+1−1
@@ -3,7 +3,7 @@ import 'babel-polyfill' // required for @ledgerhq/hw-transport-u2f
33import React from 'react'
44import ReactDOM from 'react-dom'
55
6−import Bridge from './Bridge'
6+// import Bridge from './Bridge'
77import Walletgen from './walletgen/Walletgen'
88
99import './style/index.css'
src/walletgen/Walletgen.js+1−3
@@ -6,8 +6,6 @@ import Footer from './components/Footer'
66
77import { NETWORK_STATES, PROFILE_STATES, GEN_STATES } from './lib/constants'
88
9−import BrowserWarning from './views/BrowserWarning'
10−import NetworkWarning from './views/NetworkWarning'
119import PrivacyPolicy from './views/PrivacyPolicy'
1210import Welcome from './views/Welcome'
1311import Eula from './views/Eula'
@@ -117,7 +115,7 @@ class Walletgen extends React.Component {
117115
118116
119117 render() {
120− const { network, route, currentStep, stepCount, lastRoute } = this.state;
118+ const { network, route, currentStep, lastRoute } = this.state;
121119
122120 const routed = this.router(network, route) // hacky prod
123121 // const routed = this.router(NETWORK_STATES.OFFLINE, true, route) // hacky dev
src/walletgen/components/Header.js−1
@@ -1,5 +1,4 @@
11import React from 'react'
2−import { map } from 'lodash'
32import { seq } from '../lib/lib'
43
54import { NETWORK_STATES } from '../lib/constants'
src/walletgen/views/Done.js−10
@@ -1,17 +1,7 @@
11import React from 'react'
22
3−import Button from '../components/Button'
4−import CheckBox from '../components/CheckBox'
5−
63class Done extends React.Component {
74 render() {
8−
9− const { setGlobalState, understand } = this.props
10−
11− const nextButtonClass = understand
12− ? 'btn btn-primary'
13− : 'btn shape-gray-10'
14−
155 return(
166 <div className={'col-md-7'}>
177
src/walletgen/views/Download.js−7
@@ -9,12 +9,6 @@ import CheckBox from '../components/CheckBox'
99const NEXT_STEP_NUM = 7;
1010
1111class Download extends React.Component {
12−
13− constructor(props) {
14− super(props)
15− // this.handleSave = this.handleSave.bind(this)
16− }
17−
1812 handleSave = (event) => {
1913 const { props } = this
2014
@@ -84,7 +78,6 @@ class Download extends React.Component {
8478
8579 const { props } = this
8680
87− const wallets = props['wallets.value']
8881 const downloaded = props['downloaded']
8982 const didClickDownload = props['didClickDownload']
9083
src/walletgen/views/EulaView.js−3
@@ -3,9 +3,6 @@ import React from 'react'
33import EulaText from '../components/EulaText'
44import Button from '../components/Button'
55
6−const NEXT_STEP_NUM = 2
7−
8−
96class EulaView extends React.Component {
107 render() {
118 let { setGlobalState, lastRoute } = this.props;
src/walletgen/views/Generate.js+3−3
@@ -292,7 +292,7 @@ class Generate extends React.Component {
292292 throw new Error('no ship information provided')
293293 } else {
294294 let throwawayEntry = enyTable[0]
295− // eslint-disable-next-lines
295+ // eslint-disable-next-line
296296 let throwaway = await genWallet(throwawayEntry.ship, throwawayEntry.ticket, () => {})
297297 };
298298 }
@@ -380,8 +380,8 @@ class Generate extends React.Component {
380380 };
381381
382382 const getGenButtonText = () => {
383− const N = props['wallets.genCounter'] + 1;
384− const X = props['eny.value'].length;
383+ // const N = props['wallets.genCounter'] + 1;
384+ // const X = props['eny.value'].length;
385385 let r = '';
386386 if (NONE_START === true) r = 'Generate All';
387387 if (es === ENY_PENDING) r = 'Generating Entropy';
src/walletgen/views/Upload.js+49−55
@@ -1,11 +1,6 @@
11import React, { Component } from 'react'
2−import * as lodash from 'lodash'
3−import * as sigil from 'sigil-js'
4−import ob from 'urbit-ob'
52
63import Button from '../components/Button'
7−import InputBox from '../components/InputBox'
8−import ReactSVGComponents from '../components/ReactSVGComponents'
94import UploadButton from '../components/UploadButton'
105
116import { compose } from '../lib/lib'
@@ -80,50 +75,49 @@ const validateObject = ({ data, pass, error }) => {
8075 return { data: data, pass: didPass, error: err }
8176}
8277
83−
84−const preview = ship => {
85− const name = ob.patp(ship)
86− const sig = sigil.pour({
87− patp: name,
88− colorway: ['black', 'white'],
89− renderer: ReactSVGComponents,
90− size: 64
91− })
92−
93− return (
94− <div className={'col-md-8'}>
95− <div className={'flex items-center bg-white black'} key={ ship }>
96− <div className={'col-md-5 pt-2 pl-5'}>
97− { sig }
98− </div>
99− <div className={'col-md-5'}>
100− <h4 className={'text-mono text-500 mb-0'}>
101− { name }
102− </h4>
103− </div>
104− </div>
105− </div>
78+// const preview = ship => {
79+// const name = ob.patp(ship)
80+// const sig = sigil.pour({
81+// patp: name,
82+// colorway: ['black', 'white'],
83+// renderer: ReactSVGComponents,
84+// size: 64
85+// })
86+//
87+// return (
88+// <div className={'col-md-8'}>
89+// <div className={'flex items-center bg-white black'} key={ ship }>
90+// <div className={'col-md-5 pt-2 pl-5'}>
91+// { sig }
92+// </div>
93+// <div className={'col-md-5'}>
94+// <h4 className={'text-mono text-500 mb-0'}>
95+// { name }
96+// </h4>
97+// </div>
98+// </div>
99+// </div>
106100 // <div className={'flex h-16 w-60 bg-white black items-center'} key={ ship }>
107101 // { sig }
108102 // <div className={'pl-4 text-mono text-500'}>
109103 // { name }
110104 // </div>
111105 // </div>
112− )
113−}
114−
115−const shipList = profile => {
116− const ships = Object.keys(profile)
117− return(
118− <div>
119− <h2>Total Ships: { ships.length }</h2>
120−
121− <div className={''}>
122− { ships.map(preview) }
123− </div>
124− </div>
125− )
126−}
106+// )
107+// }
108+
109+// const shipList = profile => {
110+// const ships = Object.keys(profile)
111+// return(
112+// <div>
113+// <h2>Total Ships: { ships.length }</h2>
114+//
115+// <div className={''}>
116+// { ships.map(preview) }
117+// </div>
118+// </div>
119+// )
120+// }
127121
128122class Upload extends Component {
129123 constructor(props) {
@@ -242,17 +236,17 @@ class Upload extends Component {
242236 }
243237}
244238
245−const ShipList = (ships, title) => {
246− if (ships.length > 0) {
247− return (
248− <div>
249− <h2>{ title }</h2>
250− { ships.map(ship => preview(ship)) }
251− </div>
252− )
253− } else {
254− return <div />
255− }
256−}
239+// const ShipList = (ships, title) => {
240+// if (ships.length > 0) {
241+// return (
242+// <div>
243+// <h2>{ title }</h2>
244+// { ships.map(ship => preview(ship)) }
245+// </div>
246+// )
247+// } else {
248+// return <div />
249+// }
250+// }
257251
258252export default Upload