on master help sign in
Merge branch 'master' into hosting-rc
commita96585105507cea2fa1df19a0f64f1fd3b79868b authorLiam Fitzgerald <liam@urizen.co> dateWed 18 Mar 2020, 10:47 (7 years ago) parent494db956314cef
20 files changed+235−129
package-lock.json+1−1 package.json+1−1 src/assets/secret-hidden.svg+17 src/assets/secret-show.svg+4 src/form/Inputs.js+4−3 src/indigo-react/components/CheckboxInput.js+14−4 src/indigo-react/components/Input.js+9−4 src/indigo-react/components/ToggleInput.js+4−1 src/lib/routeNames.js+1 src/lib/router.js+2 src/lib/starRelease.js+29−22 src/views/Login.js+46−31 src/views/Login/Keystore.js+2−2 src/views/Login/Ledger.js+1−4 src/views/Login/Metamask.js+1−4 src/views/Login/Mnemonic.js+1−1 src/views/Login/Other.js+15−10 src/views/Login/PrivateKey.js+1−1 src/views/Login/Ticket.js+81−35 src/views/Login/Trezor.js+1−5
package-lock.json+1−1
@@ -1,6 +1,6 @@
11{
22 "name": "bridge",
3− "version": "2.3.3",
3+ "version": "2.3.5",
44 "lockfileVersion": 1,
55 "requires": true,
66 "dependencies": {
package.json+1−1
@@ -1,6 +1,6 @@
11{
22 "name": "bridge",
3− "version": "2.3.3",
3+ "version": "2.3.5",
44 "description": "An application for interacting with Azimuth",
55 "repository": {
66 "type": "git",
src/assets/secret-hidden.svgnew file+17
@@ -0,0 +1,17 @@
1+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2+<rect width="16" height="16" fill="white"/>
3+<path fill-rule="evenodd" clip-rule="evenodd" d="M8 13C13.0495 13 16 8 16 8C16 8 13.0495 3 8 3C2.95054 3 0 8 0 8C0 8 2.95054 13 8 13ZM8 10C9.10457 10 10 9.10457 10 8C10 6.89543 9.10457 6 8 6C6.89543 6 6 6.89543 6 8C6 9.10457 6.89543 10 8 10Z" fill="black"/>
4+<g filter="url(#filter0_d)">
5+<path d="M2 2.70588L2.70588 2L14 13.2941L13.2941 14L2 2.70588Z" fill="black"/>
6+</g>
7+<defs>
8+<filter id="filter0_d" x="1" y="2" width="13" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
9+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
10+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
11+<feOffset dx="-1"/>
12+<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
13+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
14+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
15+</filter>
16+</defs>
17+</svg>
src/assets/secret-show.svgnew file+4
@@ -0,0 +1,4 @@
1+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2+<rect width="16" height="16" fill="white"/>
3+<path fill-rule="evenodd" clip-rule="evenodd" d="M8 13C13.0495 13 16 8 16 8C16 8 13.0495 3 8 3C2.95054 3 0 8 0 8C0 8 2.95054 13 8 13ZM8 10C9.10457 10 10 9.10457 10 8C10 6.89543 9.10457 6 8 6C6.89543 6 6 6.89543 6 8C6 9.10457 6.89543 10 8 10Z" fill="#B1B2B3"/>
4+</svg>
src/form/Inputs.js+4−3
@@ -18,6 +18,7 @@ const PLACEHOLDER_HD_PATH = DEFAULT_HD_PATH;
1818const PLACEHOLDER_MNEMONIC =
1919 'example crew supreme gesture quantum web media hazard theory mercy wing kitten';
2020const PLACEHOLDER_TICKET = '~sampel-ticlyt-migfun-falmel';
21+const PLACEHOLDER_PASSWORD = '••••••-••••••-••••••-••••••';
2122const PLACEHOLDER_ADDRESS = '0x';
2223const PLACEHOLDER_HEX = '0x';
2324const PLACEHOLDER_PRIVATE_KEY =
@@ -26,7 +27,7 @@ const PLACEHOLDER_EMAIL = 'email@example.com';
2627
2728const formatPat = buildFormatter([downcase, ensurePatFormat]);
2829
29−export function TicketInput({ name, ...rest }) {
30+export function TicketInput({ name, hidden, ...rest }) {
3031 const {
3132 meta: { valid, error, validating, touched, active },
3233 } = useField(name, {
@@ -41,10 +42,10 @@ export function TicketInput({ name, ...rest }) {
4142
4243 return (
4344 <Input
44− type="text"
45+ type={hidden ? 'password' : 'text'}
4546 name={name}
4647 obscure={value => value.replace(/[^~-]+/g, '••••••')}
47− placeholder={PLACEHOLDER_TICKET}
48+ placeholder={hidden ? PLACEHOLDER_PASSWORD : PLACEHOLDER_TICKET}
4849 autoCapitalize="none"
4950 autoCorrect="off"
5051 accessory={
src/indigo-react/components/CheckboxInput.js+14−4
@@ -9,6 +9,9 @@ export default function CheckboxInput({
99 name,
1010 label,
1111 className,
12+ style,
13+ inline = false,
14+ white = false,
1215
1316 disabled,
1417}) {
@@ -23,7 +26,8 @@ export default function CheckboxInput({
2326 <Flex
2427 row
2528 align="center"
26− className={cn(className, 'mv2', {
29+ className={cn(className, {
30+ mv2: !inline,
2731 black: !disabled,
2832 gray4: disabled,
2933 })}
@@ -39,19 +43,25 @@ export default function CheckboxInput({
3943 <Flex.Item
4044 flex
4145 as="label"
42− className="f6 mr3 lh-tall us-none pointer flex-row align-center"
46+ className={cn(
47+ { mr3: !inline },
48+ 'f6 lh-tall us-none pointer flex-row align-center'
49+ )}
4350 htmlFor={name}>
4451 <Flex
4552 justify="center"
4653 align="center"
47− className={cn('b1 p1 mr3', {
54+ className={cn('b1 p1', {
55+ mr3: !inline,
56+ mr1: inline,
4857 'bg-gray1': disabled,
49− 'bg-black white b-black': !disabled && input.value,
58+ 'bg-black white b-black': !disabled && (input.value || white),
5059 'bg-white black b-black': !disabled && !input.value,
5160 })}
5261 style={{
5362 height: '14px',
5463 width: '14px',
64+ ...style,
5565 }}>
5666 {input.value && '✓'}
5767 </Flex>
src/indigo-react/components/Input.js+9−4
@@ -11,6 +11,7 @@ export default function Input({
1111 label,
1212 className,
1313 accessory,
14+ labelAccessory,
1415 disabled = false,
1516 mono = false,
1617 obscure,
@@ -65,13 +66,17 @@ export default function Input({
6566 }),
6667 }}>
6768 <Flex.Item
68− as="label"
69+ as={Flex}
70+ justify="between"
71+ align="center"
6972 className={cn('f6 lh-tall', {
7073 black: !disabled,
7174 gray4: disabled,
72− })}
73− htmlFor={name}>
74− {label}
75+ })}>
76+ <Flex.Item as="label" justify htmlFor={name}>
77+ {label}
78+ </Flex.Item>
79+ {labelAccessory && <Flex.Item>{labelAccessory}</Flex.Item>}
7580 </Flex.Item>
7681 <Flex.Item as={Flex} row className="rel">
7782 <Flex.Item
src/indigo-react/components/ToggleInput.js+4−1
@@ -11,6 +11,7 @@ export default function ToggleInput({
1111 label,
1212 inverseLabel,
1313 inverseColor = 'black',
14+ small = false,
1415 className,
1516
1617 //
@@ -55,7 +56,9 @@ export default function ToggleInput({
5556 htmlFor={name}>
5657 <LinkButton
5758 disabled={disabled}
58− className={cn('f5', {
59+ className={cn({
60+ f5: !small,
61+ f6: small,
5962 black: !input.checked,
6063 [inverseColor]: input.checked,
6164 })}>
src/lib/routeNames.js+1
@@ -8,6 +8,7 @@ export const ROUTE_NAMES = {
88 SENATE: Symbol('SENATE'),
99 //
1010 LOGIN: Symbol('LOGIN'),
11+ LOGIN_OTHER: Symbol('OTHER'),
1112 REDOWNLOAD: Symbol('REDOWNLOAD'),
1213 RETICKET: Symbol('RETICKET'),
1314 PERMISSIONS: Symbol('PERMISSIONS'),
src/lib/router.js+2
@@ -1,5 +1,6 @@
11import Disclaimer from 'views/Disclaimer';
22import Login from 'views/Login.js';
3+import Other from 'views/Login/Other.js';
34import Senate from 'views/Senate';
45import CreateGalaxy from 'views/CreateGalaxy';
56import IssueChild from 'views/IssueChild';
@@ -24,6 +25,7 @@ export const ROUTES = {
2425 [ROUTE_NAMES.DISCLAIMER]: Disclaimer,
2526 [ROUTE_NAMES.ACTIVATE]: Activate,
2627 [ROUTE_NAMES.LOGIN]: Login,
28+ [ROUTE_NAMES.LOGIN_OTHER]: Other,
2729 [ROUTE_NAMES.POINTS]: Points,
2830 [ROUTE_NAMES.POINT]: Point,
2931 [ROUTE_NAMES.CREATE_GALAXY]: CreateGalaxy,
src/lib/starRelease.js+29−22
@@ -75,36 +75,43 @@ export async function getConditional(contracts, address) {
7575 return { total: 0, available: 0, withdrawn: 0, batchLimits: [] };
7676 }
7777
78− const forfeited = await conditionalSR.getForfeited(contracts, address);
7978 const total = remaining.length;
8079 let balance = total;
8180
82− const withdrawLimits = await batches.reduce(async (p, _, idx) => {
83− const acc = await p;
84− if (forfeited[idx] || balance === 0) {
85− return [...acc, 0];
86− }
87− const limit = await conditionalSR.getWithdrawLimit(contracts, address, idx);
88− if (limit <= balance) {
89− balance -= limit;
90− return [...acc, limit];
91− }
92− const remaining = balance;
93− balance = 0;
81+ // does not account for forfeiting or withdrawl
82+ const limits = await Promise.all(
83+ batches.map((_, idx) =>
84+ conditionalSR.getWithdrawLimit(contracts, address, idx)
85+ )
86+ );
9487
95− return [...acc, remaining];
96− }, Promise.resolve([]));
88+ const withdrawn = await conditionalSR.getWithdrawn(contracts, address);
9789
98− const available = withdrawLimits.reduce((acc, val) => acc + val, 0);
90+ const forfeited = await conditionalSR.getForfeited(contracts, address);
9991
100− const withdrawnAmounts = await conditionalSR.getWithdrawn(contracts, address);
92+ const batchLimits = [];
10193
102− const withdrawn = withdrawnAmounts.reduce((acc, val) => acc + val, 0);
103− const batchLimits = withdrawLimits.map(
104− (limit, idx) => limit - withdrawnAmounts[idx]
105− );
94+ for (let i = 0; i < limits.length; i++) {
95+ // skip batch if forfeited or no stars left
96+ if (forfeited[i] || balance === 0) {
97+ batchLimits.push(0);
98+ continue;
99+ }
100+ const availableInBatch = limits[i] - withdrawn[i];
101+ if (balance < availableInBatch) {
102+ batchLimits.push(balance);
103+ balance = 0;
104+ continue;
105+ }
106+ batchLimits.push(availableInBatch);
107+ balance = balance - availableInBatch;
108+ }
109+
110+ const withdrawnTotal = withdrawn.reduce((acc, val) => acc + val, 0);
111+ const available =
112+ batchLimits.reduce((acc, val) => acc + val, 0) + withdrawnTotal;
106113
107− return { total, available, withdrawn, batchLimits };
114+ return { total, available, withdrawn: withdrawnTotal, batchLimits };
108115}
109116
110117export async function getLinear(contracts, address) {
src/views/Login.js+46−31
@@ -1,5 +1,5 @@
11import React, { useCallback, useState } from 'react';
2−import { P, H4, Grid } from 'indigo-react';
2+import { P, H4, H5, Grid, Text, Button, Flex, LinkButton } from 'indigo-react';
33
44import { version } from '../../package.json';
55
@@ -45,9 +45,7 @@ export default function Login() {
4545 const { walletType } = useWallet();
4646
4747 // inputs
48− const [currentTab, setCurrentTab] = useState(
49− walletTypeToViewName(walletType)
50− );
48+ const [isOther, setisOther] = useState(false);
5149
5250 const goToActivate = useCallback(() => push(names.ACTIVATE), [
5351 push,
@@ -61,37 +59,54 @@ export default function Login() {
6159 return (
6260 <View inset>
6361 <Grid>
64− <Grid.Item full as={Crumbs} routes={[{ text: 'Bridge' }]} />
65− <Grid.Item full as={H4} className="mt4">
66− Login
67− </Grid.Item>
68−
69− <Grid.Item
70− full
71− as={Tabs}
72− className="mt1"
73− // Tabs
74− views={VIEWS}
75− options={OPTIONS}
76− currentTab={currentTab}
77− onTabChange={setCurrentTab}
78− // Tab extra
79− goHome={goHome}
80− />
81− <Grid.Item full as={P} className="f6">
82− Version {version}
62+ <Grid.Item full as={Text} className="flex justify-center mt9 mb7">
63+ <Grid.Item as={Text} className="gray3">
64+ Urbit ID /&nbsp;
65+ </Grid.Item>
66+ <Grid.Item as={Text}>Login</Grid.Item>
8367 </Grid.Item>
68+ {isOther && <Grid.Item full as={Other} goHome={goHome} />}
69+ {!isOther && <Grid.Item full as={Ticket} goHome={goHome} />}
70+ {!isOther && (
71+ <>
72+ <Grid.Item full className="t-center mv4 gray4">
73+ or
74+ </Grid.Item>
75+ <Grid.Item
76+ full
77+ as={Button}
78+ className="b-solid b1 b-black"
79+ center
80+ onClick={() => setisOther(true)}>
81+ Metamask, Mnemonic, Hardware Wallet...
82+ </Grid.Item>
83+ <Grid.Item full onClick={goToActivate} className="mv10 t-center f6">
84+ <span className="gray4">New Urbit ID? </span>
85+ <LinkButton>Activate</LinkButton>
86+ </Grid.Item>
87+ </>
88+ )}
89+ {isOther && (
90+ <Grid.Item
91+ as={LinkButton}
92+ onClick={() => setisOther(false)}
93+ full
94+ className="t-center underline f6 mt8">
95+ Back
96+ </Grid.Item>
97+ )}
8498 </Grid>
8599
86100 <Footer>
87− <Grid>
88− <Grid.Divider />
89− <Grid.Item full as={ForwardButton} onClick={goToActivate}>
90− Activate
91− </Grid.Item>
92− <Grid.Divider />
93− <Grid.Item full as={OfflineButton} />
94− </Grid>
101+ <Flex className="mb8 f6" justify="between">
102+ <Flex.Item
103+ as="a"
104+ href="https://github.com/urbit/bridge/releases"
105+ className="us-none pointer">
106+ <span className="underline">Offline</span> ↗
107+ </Flex.Item>
108+ <Flex.Item className="gray4">v{version}</Flex.Item>
109+ </Flex>
95110 </Footer>
96111 </View>
97112 );
src/views/Login/Keystore.js+2−2
@@ -1,6 +1,6 @@
11import React, { useCallback, useMemo } from 'react';
22import { Just } from 'folktale/maybe';
3−import { P, Grid } from 'indigo-react';
3+import { Text, Grid } from 'indigo-react';
44import * as keythereum from 'keythereum';
55
66import { useWallet } from 'store/wallet';
@@ -56,7 +56,7 @@ export default function Keystore({ className, goHome }) {
5656
5757 return (
5858 <Grid className={className}>
59− <Grid.Item full as={P}>
59+ <Grid.Item full as={Text} className="f6 gray4 mb3">
6060 Please upload your Ethereum keystore file. If your keystore file is
6161 encrypted with a password, you'll also need to enter that below.
6262 </Grid.Item>
src/views/Login/Ledger.js+1−4
@@ -150,10 +150,7 @@ export default function Ledger({ className, goHome }) {
150150
151151 const renderHTTPS = () => (
152152 <>
153− <Grid.Item full as={H5}>
154− Authenticate With Your Ledger
155− </Grid.Item>
156− <Grid.Item full as={Text} className="f6 mb3">
153+ <Grid.Item full as={Text} className="f6 gray4 mb3">
157154 Connect and authenticate to your Ledger, and then open the "Ethereum"
158155 application. If you're running on older firmware, make sure the "browser
159156 support" option is turned on. To sign transactions, you'll also need to
src/views/Login/Metamask.js+1−4
@@ -47,10 +47,7 @@ function Unsupported() {
4747function Login({ onSubmit, goHome }) {
4848 return (
4949 <>
50− <Grid.Item full as={H5}>
51− Authenticate with Metamask
52− </Grid.Item>
53− <Grid.Item full as={Text} className="f6 mb3">
50+ <Grid.Item full as={Text} className="f6 gray4 mb3">
5451 If you wish to login with a different wallet, please change it in the
5552 Metamask extension
5653 </Grid.Item>
src/views/Login/Mnemonic.js+1−1
@@ -113,7 +113,7 @@ export default function Mnemonic({ className, goHome }) {
113113 <Grid.Item full as={FormError} />
114114
115115 <Grid.Item full as={SubmitButton} handleSubmit={handleSubmit}>
116− Continue
116+ Login
117117 </Grid.Item>
118118 </>
119119 )}
src/views/Login/Other.js+15−10
@@ -1,7 +1,9 @@
11import React, { useState, useMemo } from 'react';
2+import { Grid } from 'indigo-react';
23
34import useBreakpoints from 'lib/useBreakpoints';
45
6+import View from 'components/View';
57import Accordion from 'components/Accordion';
68
79import PrivateKey from './PrivateKey';
@@ -30,10 +32,10 @@ const VIEWS = {
3032};
3133
3234const OPTIONS = [
35+ { text: 'Metamask', value: NAMES.METAMASK },
3336 { text: 'Mnemonic (BIP 39)', value: NAMES.MNEMONIC },
3437 { text: 'Ledger', value: NAMES.LEDGER },
3538 { text: 'Trezor', value: NAMES.TREZOR },
36− { text: 'Metamask', value: NAMES.METAMASK },
3739 { text: 'Ethereum Private Key', value: NAMES.PRIVATE_KEY },
3840 { text: 'Ethereum Keystore', value: NAMES.KEYSTORE },
3941];
@@ -54,14 +56,17 @@ export default function Other({ className, ...rest }) {
5456 [hardwareAllowed]
5557 );
5658 return (
57− <Accordion
58− className={className}
59− views={VIEWS}
60− options={options}
61− currentTab={currentTab}
62− onTabChange={setCurrentTab}
63− //
64− {...rest}
65− />
59+ <>
60+ <Grid.Divider />
61+ <Accordion
62+ className={className}
63+ views={VIEWS}
64+ options={options}
65+ currentTab={currentTab}
66+ onTabChange={setCurrentTab}
67+ //
68+ {...rest}
69+ />
70+ </>
6671 );
6772}
src/views/Login/PrivateKey.js+1−1
@@ -53,7 +53,7 @@ export default function PrivateKey({ className, goHome }) {
5353 />
5454 <Grid.Item full as={FormError} />
5555 <Grid.Item full as={SubmitButton} handleSubmit={handleSubmit}>
56− Continue
56+ Login
5757 </Grid.Item>
5858 </>
5959 )}
src/views/Login/Ticket.js+81−35
@@ -3,7 +3,13 @@ import { Just } from 'folktale/maybe';
33import cn from 'classnames';
44import * as azimuth from 'azimuth-js';
55import * as kg from 'urbit-key-generation';
6−import { Grid, CheckboxInput, Flex, ToggleInput } from 'indigo-react';
6+import {
7+ Grid,
8+ CheckboxInput,
9+ Flex,
10+ ToggleInput,
11+ AccessoryIcon,
12+} from 'indigo-react';
713import { FORM_ERROR } from 'final-form';
814
915import { useNetwork } from 'store/network';
@@ -31,6 +37,56 @@ import FormError from 'form/FormError';
3137import SubmitButton from 'form/SubmitButton';
3238import { WARNING } from 'form/helpers';
3339
40+import { ReactComponent as SecretShowIcon } from 'assets/secret-show.svg';
41+import { ReactComponent as SecretHideIcon } from 'assets/secret-hidden.svg';
42+
43+function AdvancedOptions() {
44+ return (
45+ <Flex.Item as={Flex}>
46+ <Condition when="useAdvanced" is={true}>
47+ <Flex.Item
48+ as={CheckboxInput}
49+ inline
50+ white
51+ className="mr4"
52+ name="usePassphrase"
53+ label="Passphrase"
54+ style={{ boxSizing: 'border-box' }}
55+ />
56+ <Flex.Item
57+ as={CheckboxInput}
58+ inline
59+ white
60+ className="mr4"
61+ name="useShards"
62+ label="Shards"
63+ style={{ boxSizing: 'border-box' }}
64+ />
65+ </Condition>
66+ <Flex.Item
67+ as={ToggleInput}
68+ name="useAdvanced"
69+ label="Settings"
70+ small
71+ inverseLabel="Close"
72+ />
73+ </Flex.Item>
74+ );
75+}
76+
77+function TicketInputAccessory({ name }) {
78+ return (
79+ <AccessoryIcon>
80+ <ToggleInput
81+ name={name}
82+ className="mt1"
83+ inverseLabel={<SecretShowIcon />}
84+ label={<SecretHideIcon />}
85+ />
86+ </AccessoryIcon>
87+ );
88+}
89+
3490export default function Ticket({ className, goHome }) {
3591 useLoginView(WALLET_TYPES.TICKET);
3692
@@ -124,7 +180,7 @@ export default function Ticket({ className, goHome }) {
124180 shard1: buildPatqValidator(),
125181 shard2: buildPatqValidator(),
126182 shard3: buildPatqValidator(),
127− showTicket: buildCheckboxValidator(),
183+ ticketHidden: buildCheckboxValidator(),
128184 passphrase: buildPassphraseValidator(),
129185 },
130186 validateForm
@@ -137,14 +193,14 @@ export default function Ticket({ className, goHome }) {
137193 point: impliedPoint || '',
138194 usePasshrase: false,
139195 useShards: false,
140− showTicket: true,
196+ ticketHidden: true,
141197 useAdvanced: false,
142198 }),
143199 [impliedPoint]
144200 );
145201
146202 return (
147− <Grid className={cn('mt4', className)}>
203+ <Grid className={className}>
148204 <BridgeForm
149205 validate={validate}
150206 onSubmit={onSubmit}
@@ -158,7 +214,10 @@ export default function Ticket({ className, goHome }) {
158214 <Grid.Item
159215 full
160216 as={TicketInput}
161− type={values.showTicket ? 'text' : 'password'}
217+ hidden={values.ticketHidden}
218+ labelAccessory={<AdvancedOptions />}
219+ accessory={<TicketInputAccessory name="ticketHidden" />}
220+ className="mt3"
162221 name="ticket"
163222 label="Master Ticket"
164223 />
@@ -168,32 +227,38 @@ export default function Ticket({ className, goHome }) {
168227 <Grid.Item
169228 full
170229 as={TicketInput}
171− type={values.showTicket ? 'text' : 'password'}
230+ accessory={<TicketInputAccessory name="ticketHidden" />}
231+ hidden={values.ticketHidden}
232+ labelAccessory={<AdvancedOptions />}
233+ className="mt3"
172234 name="shard1"
173235 label="Shard 1"
174236 />
175237 <Grid.Item
176238 full
177239 as={TicketInput}
178− type={values.showTicket ? 'text' : 'password'}
240+ accessory={<TicketInputAccessory name="ticketHidden" />}
241+ hidden={values.ticketHidden}
242+ className="mt3"
179243 name="shard2"
180244 label="Shard 2"
181245 />
182246 <Grid.Item
183247 full
184248 as={TicketInput}
185− type={values.showTicket ? 'text' : 'password'}
249+ className="mt3"
250+ accessory={<TicketInputAccessory name="ticketHidden" />}
251+ hidden={values.ticketHidden}
186252 name="shard3"
187253 label="Shard 3"
188254 />
189255 </Condition>
190256
191− <Grid.Item full as={CheckboxInput} name="showTicket" label="Show" />
192−
193257 <Condition when="usePassphrase" is={true}>
194258 <Grid.Item
195259 full
196260 as={PassphraseInput}
261+ className="mt3"
197262 name="passphrase"
198263 label="Wallet Passphrase"
199264 />
@@ -201,38 +266,19 @@ export default function Ticket({ className, goHome }) {
201266
202267 <Grid.Item full as={FormError} />
203268
204− <Grid.Item full as={SubmitButton} handleSubmit={handleSubmit}>
269+ <Grid.Item
270+ full
271+ as={SubmitButton}
272+ center
273+ handleSubmit={handleSubmit}>
205274 {isWarning =>
206275 submitting
207276 ? 'Logging in...'
208277 : isWarning
209278 ? 'Login Anyway'
210− : 'Continue'
279+ : 'Login'
211280 }
212281 </Grid.Item>
213−
214− <Grid.Item full as={Flex} justify="between">
215− <Flex.Item
216− as={ToggleInput}
217− name="useAdvanced"
218− label="Advanced"
219− inverseLabel="Hide"
220− />
221− <Condition when="useAdvanced" is={true}>
222− <Flex.Item as={Flex}>
223− <Flex.Item
224− as={CheckboxInput}
225− name="usePassphrase"
226− label="Passphrase"
227− />
228− <Flex.Item
229− as={CheckboxInput}
230− name="useShards"
231− label="Shards"
232− />
233− </Flex.Item>
234− </Condition>
235− </Grid.Item>
236282 </>
237283 )}
238284 </BridgeForm>
src/views/Login/Trezor.js+1−5
@@ -94,11 +94,7 @@ export default function Trezor({ className, goHome }) {
9494
9595 return (
9696 <Grid className={className}>
97− <Grid.Item full as={H5}>
98− Authenticate With Your Trezor
99− </Grid.Item>
100−
101− <Grid.Item full as={Text} className="f6 mb3">
97+ <Grid.Item full as={Text} className="f6 gray4 mb3">
10298 Connect and authenticate to your Trezor. If you'd like to use a custom
10399 derivation path, you may enter it below.
104100 </Grid.Item>