on master help sign in
Remove superfluous {} around text in login flow
faa39fbFang
src/views/Login/Keystore.js+9−10
@@ -76,27 +76,26 @@ export default function Keystore({ loginCompleted }) {
76 decryptionProblem === false ? (
76 decryptionProblem === false ? (
77 <div />
77 <div />
78 ) : (
78 ) : (
79− <Warning className={'mt-8'}>
79+ <Warning className="mt-8">
80 <H3 style={{ marginTop: 0, paddingTop: 0 }}>
80 <H3 style={{ marginTop: 0, paddingTop: 0 }}>
81− {"Couldn't decrypt wallet."}
81+ Couldn't decrypt wallet.
82 </H3>
82 </H3>
83− {'You may have entered an incorrect password.'}
83+ You may have entered an incorrect password.
84 </Warning>
84 </Warning>
85 );
85 );
86
86
87 return (
87 return (
88 <View>
88 <View>
89 <InputCaption>
89 <InputCaption>
90− {`Please upload your Ethereum keystore file. If your keystore
90+ Please upload your Ethereum keystore file. If your keystore file is
91− file is encrypted with a password, you'll also need to enter
91+ encrypted with a password, you'll also need to enter that below.
92− that below.`}
93 </InputCaption>
92 </InputCaption>
94
93
95 <UploadButton
94 <UploadButton
96 className={`${uploadButtonClass} mt3`}
95 className={`${uploadButtonClass} mt3`}
97 onChange={handleKeystoreUpload}>
96 onChange={handleKeystoreUpload}>
98− <div className={'flex-center-all fs-4 h-11 pointer'}>
97+ <div className="flex-center-all fs-4 h-11 pointer">
99− {'Upload Keystore file'}
98+ Upload Keystore file
100 </div>
99 </div>
101 </UploadButton>
100 </UploadButton>
102
101
@@ -108,7 +107,7 @@ export default function Keystore({ loginCompleted }) {
108 autoFocus></PassphraseInput>
107 autoFocus></PassphraseInput>
109
108
110 <ForwardButton
109 <ForwardButton
111− className={`mt3`}
110+ className="mt3"
112 disabled={Nothing.hasInstance(keystore)}
111 disabled={Nothing.hasInstance(keystore)}
113 onClick={constructWallet}>
112 onClick={constructWallet}>
114 Decrypt
113 Decrypt
@@ -117,7 +116,7 @@ export default function Keystore({ loginCompleted }) {
117 {decryptMessage}
116 {decryptMessage}
118
117
119 <ForwardButton
118 <ForwardButton
120− className={'mt3'}
119+ className="mt3"
121 disabled={Nothing.hasInstance(wallet)}
120 disabled={Nothing.hasInstance(wallet)}
122 onClick={loginCompleted}>
121 onClick={loginCompleted}>
123 Continue
122 Continue
src/views/Login/Ledger.js+30−41
@@ -69,10 +69,7 @@ export default function Ledger({ loginCompleted }) {
69 const pathOptions = [
69 const pathOptions = [
70 { title: 'Ledger Live', value: LEDGER_LIVE_PATH },
70 { title: 'Ledger Live', value: LEDGER_LIVE_PATH },
71 { title: 'Ledger Legacy', value: LEDGER_LEGACY_PATH },
71 { title: 'Ledger Legacy', value: LEDGER_LEGACY_PATH },
72− {
73− title: 'Custom path',
72+ { title: 'Custom path', value: 'custom' },
74− value: 'custom',
75− },
76 ];
73 ];
77 const basePathTitle = pathOptions.find(o => o.value === basePath).title;
74 const basePathTitle = pathOptions.find(o => o.value === basePath).title;
78
75
@@ -90,7 +87,7 @@ export default function Ledger({ loginCompleted }) {
90 className="mt-8"
87 className="mt-8"
91 options={pathOptions}
88 options={pathOptions}
92 handleUpdate={handlePathSelection}
89 handleUpdate={handlePathSelection}
93− title={'Derivation path'}
90+ title="Derivation path"
94 currentSelectionTitle={basePathTitle}
91 currentSelectionTitle={basePathTitle}
95 fullWidth={true}
92 fullWidth={true}
96 />
93 />
@@ -106,7 +103,7 @@ export default function Ledger({ loginCompleted }) {
106 value={addHdPrefix(hdPath)}
103 value={addHdPrefix(hdPath)}
107 autocomplete="off"
104 autocomplete="off"
108 onChange={setHdPath}>
105 onChange={setHdPath}>
109− <InnerLabel>{'HD Path'}</InnerLabel>
106+ <InnerLabel>HD Path</InnerLabel>
110 </Input>
107 </Input>
111 ) : (
108 ) : (
112 <InnerLabelDropdown
109 <InnerLabelDropdown
@@ -115,7 +112,7 @@ export default function Ledger({ loginCompleted }) {
115 prop-format="innerLabel"
112 prop-format="innerLabel"
116 options={accountOptions}
113 options={accountOptions}
117 handleUpdate={handleAccountSelection}
114 handleUpdate={handleAccountSelection}
118− title={'Account'}
115+ title="Account"
119 currentSelectionTitle={accountTitle}
116 currentSelectionTitle={accountTitle}
120 fullWidth={true}
117 fullWidth={true}
121 />
118 />
@@ -123,54 +120,46 @@ export default function Ledger({ loginCompleted }) {
123
120
124 return (
121 return (
125 <View>
122 <View>
126− <H1>{'Authenticate With Your Ledger'}</H1>
123+ <H1>Authenticate With Your Ledger</H1>
127
124
128− <H2>{'Running on HTTPS?'}</H2>
125+ <H2>Running on HTTPS?</H2>
129
126
130 <P>
127 <P>
131− {`Connect and authenticate to your Ledger, and then open the
128+ Connect and authenticate to your Ledger, and then open the "Ethereum"
132− "Ethereum" application. If you're running on older firmware,
129+ application. If you're running on older firmware, make sure the "browser
133− make sure the "browser support" option is turned on. To sign
130+ support" option is turned on. To sign transactions, you'll also need to
134− transactions, you'll also need to enable the "contract data"
131+ enable the "contract data" option.
135− option.`}
136 </P>
132 </P>
137
133
138 <P>
134 <P>
139− {`If you'd like to use a custom derivation path, you may enter
135+ If you'd like to use a custom derivation path, you may enter it below.
140− it below.`}
141 </P>
136 </P>
142
137
143− <H2>{'Running on HTTP?'}</H2>
138+ <H2>Running on HTTP?</H2>
144
139
140+ <P>
145− <P>{`To authenticate and sign transactions with a Ledger, Bridge
141+ To authenticate and sign transactions with a Ledger, Bridge must be
146− must be serving over HTTPS on localhost. You can do this via the
142+ serving over HTTPS on localhost. You can do this via the following:
147− following:`}</P>
143+ </P>
148
144
149− <ol className={'measure-md'}>
145+ <ol className="measure-md">
150− <li className={'mt-4'}>
146+ <li className="mt-4">
151− {'Install'}{' '}
147+ Install
152− <a target={'_blank'} href={'https://github.com/FiloSottile/mkcert'}>
148+ <a target="_blank" href="https://github.com/FiloSottile/mkcert">
153− {'mkcert'}
149+ mkcert
154 </a>
150 </a>
155 </li>
151 </li>
156− <li className={'mt-4'}>
152+ <li className="mt-4">
157− {'Install a local certificate authority via '}
153+ Install a local certificate authority via <code>mkcert -install</code>
158− <code>{'mkcert -install'}</code>
159 </li>
154 </li>
160− <li className={'mt-4'}>
155+ <li className="mt-4">
161− {'In your '}
162− <code>{'bridge'}</code>
163− {' directory, generate a certificate valid for localhost via '}{' '}
156+ In your <code>bridge</code> directory, generate a certificate valid
164− <code>{'mkcert localhost'}</code>
157+ for localhost via <code>mkcert localhost</code>. This will produce two
165− {'.'}
166− {'This will produce two files: '}
167− <code>{'localhost.pem'}</code> {', the local certificate, and '}
158+ files: <code>localhost.pem</code>, the local certificate, and
168− <code>{'localhost-key.pem'}</code>
169− {', its corresponding private key.'}
159+ <code>localhost-key.pem</code> , its corresponding private key.
170 </li>
160 </li>
171− <li className={'mt-4'}>
161+ <li className="mt-4">
172− {'Run '}
173− <code>{'python bridge-https.py'}</code>
162+ Run <code>python bridge-https.py</code>
174 </li>
163 </li>
175 </ol>
164 </ol>
176
165
src/views/Login/PrivateKey.js+4−3
@@ -38,12 +38,13 @@ export default function PrivateKey({ loginCompleted }) {
38 initialValue={privateKey}
38 initialValue={privateKey}
39 onValue={handlePrivateKeyInput}
39 onValue={handlePrivateKeyInput}
40 autocomplete="off"
40 autocomplete="off"
41− autoFocus></PassphraseInput>
41+ autoFocus
42+ />
42 <ForwardButton
43 <ForwardButton
43− className={'mt3'}
44+ className="mt3"
44 disabled={Nothing.hasInstance(wallet)}
45 disabled={Nothing.hasInstance(wallet)}
45 onClick={loginCompleted}>
46 onClick={loginCompleted}>
46− {'Continue →'}
47+ Continue
47 </ForwardButton>
48 </ForwardButton>
48 </View>
49 </View>
49 );
50 );
src/views/Login/Shards.js+4−4
@@ -77,16 +77,16 @@ export default function Shards({ loginCompleted }) {
77 onValue={setPassphrase}
77 onValue={setPassphrase}
78 />
78 />
79 <ForwardButton
79 <ForwardButton
80− className={'mt3'}
80+ className="mt3"
81 disabled={!ready}
81 disabled={!ready}
82 onClick={walletFromShards}>
82 onClick={walletFromShards}>
83− {'Unlock Wallet →'}
83+ Unlock Wallet
84 </ForwardButton>
84 </ForwardButton>
85 <ForwardButton
85 <ForwardButton
86− className={'mt3'}
86+ className="mt3"
87 disabled={Nothing.hasInstance(wallet)}
87 disabled={Nothing.hasInstance(wallet)}
88 onClick={loginCompleted}>
88 onClick={loginCompleted}>
89− {'Continue →'}
89+ Continue
90 </ForwardButton>
90 </ForwardButton>
91 </View>
91 </View>
92 );
92 );
src/views/Login/Ticket.js−1
@@ -41,7 +41,6 @@ export default function Ticket({ advanced, loginCompleted }) {
41 const [ticketStatus, setTicketStatus] = useState(Nothing());
41 const [ticketStatus, setTicketStatus] = useState(Nothing());
42
42
43 useEffect(() => {
43 useEffect(() => {
44− console.log('something changed?');
45 verifyTicket(pointName, ticket, passphrase);
44 verifyTicket(pointName, ticket, passphrase);
46 return () => {};
45 return () => {};
47 }, [pointName, ticket, passphrase]);
46 }, [pointName, ticket, passphrase]);
src/views/Login/Trezor.js+10−15
@@ -50,12 +50,7 @@ export default function Trezor({ loginCompleted }) {
50 });
50 });
51 };
51 };
52
52
53− let accountOptions = [
53+ let accountOptions = [{ title: 'Custom path', value: 'custom' }];
54− {
55− title: 'Custom path',
56− value: 'custom',
57− },
58− ];
59 for (let i = 0; i < 20; i++) {
54 for (let i = 0; i < 20; i++) {
60 accountOptions.push({
55 accountOptions.push({
61 title: 'Account #' + (i + 1),
56 title: 'Account #' + (i + 1),
@@ -71,7 +66,7 @@ export default function Trezor({ loginCompleted }) {
71 prop-format="innerLabel"
66 prop-format="innerLabel"
72 options={accountOptions}
67 options={accountOptions}
73 handleUpdate={handleAccountSelection}
68 handleUpdate={handleAccountSelection}
74− title={'Account'}
69+ title="Account"
75 currentSelectionTitle={accountTitle}
70 currentSelectionTitle={accountTitle}
76 fullWidth={true}
71 fullWidth={true}
77 />
72 />
@@ -87,31 +82,31 @@ export default function Trezor({ loginCompleted }) {
87 value={hdPath}
82 value={hdPath}
88 autocomplete="off"
83 autocomplete="off"
89 onChange={setHdPath}>
84 onChange={setHdPath}>
90− <InnerLabel>{'HD Path'}</InnerLabel>
85+ <InnerLabel>HD Path</InnerLabel>
91 </Input>
86 </Input>
92 );
87 );
93
88
94 return (
89 return (
95 <View>
90 <View>
96− <H1>{'Authenticate With Your Trezor'}</H1>
91+ <H1>Authenticate With Your Trezor</H1>
97
92
98 <P>
93 <P>
99− {`Connect and authenticate to your Trezor. If you'd like
94+ Connect and authenticate to your Trezor. If you'd like to use a custom
100− to use a custom derivation path, you may enter it below.`}
95+ derivation path, you may enter it below.
101 </P>
96 </P>
102
97
103 {accountSelection}
98 {accountSelection}
104 {pathSelection}
99 {pathSelection}
105
100
106− <ForwardButton className={'mt3'} onClick={pollDevice}>
101+ <ForwardButton className="mt3" onClick={pollDevice}>
107− {'Authenticate'}
102+ Authenticate
108 </ForwardButton>
103 </ForwardButton>
109
104
110 <ForwardButton
105 <ForwardButton
111− className={'mt3'}
106+ className="mt3"
112 disabled={Maybe.Nothing.hasInstance(wallet)}
107 disabled={Maybe.Nothing.hasInstance(wallet)}
113 onClick={loginCompleted}>
108 onClick={loginCompleted}>
114− {'Continue'}
109+ Continue
115 </ForwardButton>
110 </ForwardButton>
116 </View>
111 </View>
117 );
112 );