on master help sign in
fix: reformat files
commitc8f19a8cf7eef9f1291dda8fae162e646c2e74d1 authorMatt Condon (shrugs) <mattgcondon@gmail.com> dateTue 11 Jun 2019, 11:50 (7 years ago) parent1281e19
15 files changed+47−31
src/bridge/Bridge.js+3−1 src/bridge/components/DropdownItem.js+3−1 src/bridge/components/HorizontalSelector.js+3−1 src/bridge/components/Passport.js+3−5 src/bridge/components/StatelessTransaction.js+5−3 src/bridge/components/icons/Chevron.js+3−1 src/bridge/views/InviteTicket.js+2−1 src/bridge/views/InvitesSend.js+2−1 src/bridge/views/Ledger.js+4−2 src/bridge/views/Network.js+8−5 src/bridge/views/SetKeys.js+2−1 src/bridge/views/Ticket.js+1−1 src/bridge/views/Trezor.js+2−1 src/bridge/views/Wallet.js+2−3 src/walletgen/views/Generate.js+4−4
src/bridge/Bridge.js+3−1
@@ -22,7 +22,9 @@ import { BRIDGE_ERROR } from './lib/error';
2222
2323const initWeb3 = networkType => {
2424 if (networkType === NETWORK_NAMES.MAINNET) {
25− const endpoint = `https://mainnet.infura.io/v3/${process.env.REACT_APP_INFURA_ENDPOINT}`;
25+ const endpoint = `https://mainnet.infura.io/v3/${
26+ process.env.REACT_APP_INFURA_ENDPOINT
27+ }`;
2628
2729 const provider = new Web3.providers.HttpProvider(endpoint);
2830 const web3 = new Web3(provider);
src/bridge/components/DropdownItem.js+3−1
@@ -10,7 +10,9 @@ const DropdownItem = props => {
1010 <button
1111 disabled={props.disabled}
1212 style={props.style}
13− className={`h-10 m-0 p-0 ph-2 bg-white flex align-center items-start bs-solid brw-2 blw-2 btw-0 bbw-0 sans ${_disabled} ${props.className}`}
13+ className={`h-10 m-0 p-0 ph-2 bg-white flex align-center items-start bs-solid brw-2 blw-2 btw-0 bbw-0 sans ${_disabled} ${
14+ props.className
15+ }`}
1416 onClick={props.onClick}>
1517 {props.children}
1618 </button>
src/bridge/components/HorizontalSelector.js+3−1
@@ -22,7 +22,9 @@ class HorizontalSelector extends React.Component {
2222 let active = opt.value === this.state.option ? 'btn-primary active' : '';
2323 return (
2424 <button
25− className={`btn ${active} h-10 ph-4 flex sans ${this.props.className}`}
25+ className={`btn ${active} h-10 ph-4 flex sans ${
26+ this.props.className
27+ }`}
2628 value={opt.value}
2729 onClick={() => this.selectOption(opt.value)}>
2830 {opt.title}
src/bridge/components/Passport.js+3−5
@@ -37,7 +37,7 @@ class Passport extends React.Component {
3737
3838 let className = filled ? 'passport-block bg-gray-30' : 'passport-block';
3939
40− blocks.push(<div key={i} data-key={i} className={className}></div>);
40+ blocks.push(<div key={i} data-key={i} className={className} />);
4141 });
4242
4343 return <div className="flex flex-wrap passport-censor">{blocks}</div>;
@@ -77,9 +77,7 @@ class Passport extends React.Component {
7777
7878 return (
7979 <div className="passport-wallet-progress" style={progressStyle}>
80− {progressDone && (
81− <div className="passport-wallet-progress-fill"></div>
82− )}
80+ {progressDone && <div className="passport-wallet-progress-fill" />}
8381 </div>
8482 );
8583 });
@@ -137,7 +135,7 @@ class Passport extends React.Component {
137135 size: 128,
138136 })
139137 ) : (
140− <div className="passport-sigil-blank"></div>
138+ <div className="passport-sigil-blank" />
141139 );
142140
143141 let currentDate = this.getCurrentDate();
src/bridge/components/StatelessTransaction.js+5−3
@@ -455,7 +455,8 @@ class StatelessTransaction extends React.Component {
455455 title={'Chain ID'}
456456 options={chainOptions}
457457 handleUpdate={handleChainUpdate}
458− currentSelectionTitle={chainDialogueTitle}></InnerLabelDropdown>
458+ currentSelectionTitle={chainDialogueTitle}
459+ />
459460 );
460461
461462 const customChainDialogue = !customChain ? null : (
@@ -509,7 +510,8 @@ class StatelessTransaction extends React.Component {
509510 disabled={!canApprove}
510511 onToggle={setUserApproval}
511512 state={userApproval}
512− label="I approve this transaction and wish to send."></CheckboxButton>
513+ label="I approve this transaction and wish to send."
514+ />
513515 );
514516
515517 const sending = txStatus !== SUBMISSION_STATES.PROMPT;
@@ -521,7 +523,7 @@ class StatelessTransaction extends React.Component {
521523 disabled={!canSend || sending}
522524 onClick={sendTxn}>
523525 <span className="relative">
524− <span className={`btn-spinner ${sendTxnSpinner}`}></span>
526+ <span className={`btn-spinner ${sendTxnSpinner}`} />
525527 {txStatus}
526528 </span>
527529 </Button>
src/bridge/components/icons/Chevron.js+3−1
@@ -4,7 +4,9 @@ import PropTypes from 'prop-types';
44const Chevron = props => {
55 return (
66 <img
7− src={`data:image/svg+xml;utf8,<svg width="11" height="24" viewBox="0 0 11 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 12L10.387 12.3166L10.646 12L10.387 11.6833L10 12ZM0.613022 1.31662L9.61302 12.3166L10.387 11.6833L1.38698 0.68338L0.613022 1.31662ZM9.61302 11.6833L0.613021 22.6834L1.38698 23.3166L10.387 12.3166L9.61302 11.6833Z" stroke="${props.color}" stroke-width="${props.strokeWidth}" fill="${props.color}"/></svg>`}
7+ src={`data:image/svg+xml;utf8,<svg width="11" height="24" viewBox="0 0 11 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 12L10.387 12.3166L10.646 12L10.387 11.6833L10 12ZM0.613022 1.31662L9.61302 12.3166L10.387 11.6833L1.38698 0.68338L0.613022 1.31662ZM9.61302 11.6833L0.613021 22.6834L1.38698 23.3166L10.387 12.3166L9.61302 11.6833Z" stroke="${
8+ props.color
9+ }" stroke-width="${props.strokeWidth}" fill="${props.color}"/></svg>`}
810 alt=""
911 style={props.style}
1012 className={props.className}
src/bridge/views/InviteTicket.js+2−1
@@ -237,7 +237,8 @@ class InviteTicket extends React.Component {
237237 <div className="passport-progress mb-2">
238238 <div
239239 className="passport-progress-filled"
240− style={{ width: progressWidth }}></div>
240+ style={{ width: progressWidth }}
241+ />
241242 </div>
242243 <div className="flex justify-between">
243244 <div className="text-mono text-sm lh-6 green-dark">
src/bridge/views/InvitesSend.js+2−1
@@ -433,7 +433,8 @@ class InvitesSend extends React.Component {
433433 this.handleEmailInput(i, value);
434434 }}
435435 placeholder={'Email address'}
436− disabled={inputDisabled}></Input>
436+ disabled={inputDisabled}
437+ />
437438 {target.hasReceived.matchWith({
438439 Nothing: () => null,
439440 Just: has =>
src/bridge/views/Ledger.js+4−2
@@ -106,7 +106,8 @@ class Ledger extends React.Component {
106106 handleUpdate={handlePathSelection}
107107 title={'Derivation path'}
108108 currentSelectionTitle={basePathTitle}
109− fullWidth={true}></InnerLabelDropdown>
109+ fullWidth={true}
110+ />
110111 );
111112
112113 const truePathSelection =
@@ -130,7 +131,8 @@ class Ledger extends React.Component {
130131 handleUpdate={handleAccountSelection}
131132 title={'Account'}
132133 currentSelectionTitle={accountTitle}
133− fullWidth={true}></InnerLabelDropdown>
134+ fullWidth={true}
135+ />
134136 );
135137
136138 return (
src/bridge/views/Network.js+8−5
@@ -34,7 +34,9 @@ class Network extends React.Component {
3434 if (network === NETWORK_NAMES.ROPSTEN) {
3535 setNetworkType(network);
3636
37− const endpoint = `https://ropsten.infura.io/v3/${process.env.REACT_APP_INFURA_ENDPOINT}`;
37+ const endpoint = `https://ropsten.infura.io/v3/${
38+ process.env.REACT_APP_INFURA_ENDPOINT
39+ }`;
3840
3941 const provider = new Web3.providers.HttpProvider(endpoint);
4042 const web3 = new Web3(provider);
@@ -46,7 +48,9 @@ class Network extends React.Component {
4648 if (network === NETWORK_NAMES.MAINNET) {
4749 setNetworkType(network);
4850
49− const endpoint = `https://mainnet.infura.io/v3/${process.env.REACT_APP_INFURA_ENDPOINT}`;
51+ const endpoint = `https://mainnet.infura.io/v3/${
52+ process.env.REACT_APP_INFURA_ENDPOINT
53+ }`;
5054
5155 const provider = new Web3.providers.HttpProvider(endpoint);
5256 const web3 = new Web3(provider);
@@ -127,9 +131,8 @@ class Network extends React.Component {
127131 title={'Node:'}
128132 handleUpdate={this.handleNetworkChange}
129133 options={networkOptions}
130− currentSelectionTitle={renderNetworkType(
131− networkType
132− )}></InnerLabelDropdown>
134+ currentSelectionTitle={renderNetworkType(networkType)}
135+ />
133136
134137 <Button
135138 className={'mt-10'}
src/bridge/views/SetKeys.js+2−1
@@ -177,7 +177,8 @@ class SetKeys extends React.Component {
177177 state={state.discontinuity}
178178 label={`I have lost important off-chain data relating to this point
179179 and need to do a hard reset.
180− (For example, rebooting an Arvo ship.)`}></CheckboxButton>
180+ (For example, rebooting an Arvo ship.)`}
181+ />
181182
182183 <StatelessTransaction
183184 // Upper scope
src/bridge/views/Ticket.js+1−1
@@ -131,7 +131,7 @@ class Ticket extends React.Component {
131131 this.walletFromTicket(ticket, pointName, passphrase)
132132 }>
133133 <span className="relative">
134− {this.state.isUnlocking && <span className="btn-spinner"></span>}
134+ {this.state.isUnlocking && <span className="btn-spinner" />}
135135 {'Unlock Wallet →'}
136136 </span>
137137 </Button>
src/bridge/views/Trezor.js+2−1
@@ -87,7 +87,8 @@ class Trezor extends React.Component {
8787 handleUpdate={handleAccountSelection}
8888 title={'Account'}
8989 currentSelectionTitle={accountTitle}
90− fullWidth={true}></InnerLabelDropdown>
90+ fullWidth={true}
91+ />
9192 );
9293
9394 const pathSelection =
src/bridge/views/Wallet.js+2−3
@@ -71,9 +71,8 @@ class Wallet extends React.Component {
7171 title={'Wallet Type:'}
7272 options={walletOptions}
7373 handleUpdate={props.setWalletType}
74− currentSelectionTitle={renderWalletType(
75− props.walletType
76− )}></InnerLabelDropdown>
74+ currentSelectionTitle={renderWalletType(props.walletType)}
75+ />
7776
7877 <Button
7978 className={'mt-10'}
src/walletgen/views/Generate.js+4−4
@@ -380,26 +380,26 @@ class Generate extends React.Component {
380380
381381 <div className="col-md-3 col-md-offset-1 mt-9">
382382 <div className="fixed" style={{ width: '230px' }}>
383− <div className="col-md-12 bg-very-high h-2 mt-4"></div>
383+ <div className="col-md-12 bg-very-high h-2 mt-4" />
384384 <h4 className="text-600 mt-2">Very High Friction</h4>
385385 <p className="text-sm" style={{ lineHeight: '16px' }}>
386386 Extremely valuable. Cold storage on a 3 part sharded paper wallet.
387387 Store each shard in a separate geographic location with protection
388388 against fire, water and other elements.
389389 </p>
390− <div className="col-md-12 bg-high h-2 mt-4"></div>
390+ <div className="col-md-12 bg-high h-2 mt-4" />
391391 <h4 className="text-600 mt-2">High Friction</h4>
392392 <p className="text-sm" style={{ lineHeight: '16px' }}>
393393 Very valuable. Cold storage on a paper wallet in a different
394394 location than your computer, such as a safe.
395395 </p>
396− <div className="col-md-12 bg-medium h-2 mt-4"></div>
396+ <div className="col-md-12 bg-medium h-2 mt-4" />
397397 <h4 className="text-600 mt-2">Medium Friction</h4>
398398 <p className="text-sm" style={{ lineHeight: '16px' }}>
399399 Store cold in a paper wallet; can be stored in a desk drawer in a
400400 trusted environment.
401401 </p>
402− <div className="col-md-12 bg-low h-2 mt-4"></div>
402+ <div className="col-md-12 bg-low h-2 mt-4" />
403403 <h4 className="text-600 mt-2">Low Friction</h4>
404404 <p className="text-sm" style={{ lineHeight: '16px' }}>
405405 Ok to store hot on a trusted networked computer.