on master help sign in
improve hardware login copy
2448f54Liam Fitzgerald
src/views/Login/Ledger.js+3−2
@@ -173,7 +173,7 @@ export default function Ledger({ className, goHome }) {
173 onSubmit={onSubmit}
173 onSubmit={onSubmit}
174 afterSubmit={goHome}
174 afterSubmit={goHome}
175 initialValues={initialValues}>
175 initialValues={initialValues}>
176− {({ handleSubmit }) => (
176+ {({ handleSubmit, submitting }) => (
177 <>
177 <>
178 <Condition when="useCustomPath" is={true}>
178 <Condition when="useCustomPath" is={true}>
179 <Grid.Item full as={HdPathInput} name="hdpath" label="HD Path" />
179 <Grid.Item full as={HdPathInput} name="hdpath" label="HD Path" />
@@ -214,7 +214,8 @@ export default function Ledger({ className, goHome }) {
214 <Grid.Item full as={FormError} />
214 <Grid.Item full as={FormError} />
215
215
216 <Grid.Item full as={SubmitButton} handleSubmit={handleSubmit}>
216 <Grid.Item full as={SubmitButton} handleSubmit={handleSubmit}>
217− Authenticate
217+ {!submitting && 'Authenticate'}
218+ {submitting && 'Please check your device'}
218 </Grid.Item>
219 </Grid.Item>
219 </>
220 </>
220 )}
221 )}
src/views/Login/Metamask.js+2−2
@@ -6,7 +6,7 @@ import { FORM_ERROR } from 'final-form';
6import { useWallet } from 'store/wallet';
6import { useWallet } from 'store/wallet';
7import { useNetwork } from 'store/network';
7import { useNetwork } from 'store/network';
8
8
9−import { WALLET_TYPES } from 'lib/wallet';
9+import { WALLET_TYPES, abbreviateAddress } from 'lib/wallet';
10import { MetamaskWallet } from 'lib/metamask';
10import { MetamaskWallet } from 'lib/metamask';
11import { getAuthToken } from 'lib/authToken';
11import { getAuthToken } from 'lib/authToken';
12import useLoginView from 'lib/useLoginView';
12import useLoginView from 'lib/useLoginView';
@@ -76,7 +76,7 @@ function Login({ onSubmit, goHome }) {
76 <Grid.Item full as={SubmitButton} handleSubmit={handleSubmit}>
76 <Grid.Item full as={SubmitButton} handleSubmit={handleSubmit}>
77 Login
77 Login
78 {window.ethereum.selectedAddress &&
78 {window.ethereum.selectedAddress &&
79− ' as ' + window.ethereum.selectedAddress}
79+ ' as ' + abbreviateAddress(window.ethereum.selectedAddress)}
80 </Grid.Item>
80 </Grid.Item>
81 )}
81 )}
82 </BridgeForm>
82 </BridgeForm>
src/views/Login/Trezor.js+4−3
@@ -8,7 +8,7 @@ import { Text, Grid, H5, CheckboxInput, SelectInput } from 'indigo-react';
8
8
9import { useWallet } from 'store/wallet';
9import { useWallet } from 'store/wallet';
10
10
11−import { TREZOR_PATH, trezorSignMessage } from 'lib/trezor';
11+import { TREZOR_PATH } from 'lib/trezor';
12import { WALLET_TYPES } from 'lib/wallet';
12import { WALLET_TYPES } from 'lib/wallet';
13import useLoginView from 'lib/useLoginView';
13import useLoginView from 'lib/useLoginView';
14import { getAuthToken } from 'lib/authToken';
14import { getAuthToken } from 'lib/authToken';
@@ -113,7 +113,7 @@ export default function Trezor({ className, goHome }) {
113 onSubmit={onSubmit}
113 onSubmit={onSubmit}
114 afterSubmit={goHome}
114 afterSubmit={goHome}
115 initialValues={initialValues}>
115 initialValues={initialValues}>
116− {({ handleSubmit }) => (
116+ {({ handleSubmit, submitting }) => (
117 <>
117 <>
118 <Condition when="useCustomPath" is={true}>
118 <Condition when="useCustomPath" is={true}>
119 <Grid.Item full as={HdPathInput} name="hdPath" label="HD Path" />
119 <Grid.Item full as={HdPathInput} name="hdPath" label="HD Path" />
@@ -141,7 +141,8 @@ export default function Trezor({ className, goHome }) {
141 <Grid.Item full as={FormError} />
141 <Grid.Item full as={FormError} />
142
142
143 <Grid.Item full as={SubmitButton} handleSubmit={handleSubmit}>
143 <Grid.Item full as={SubmitButton} handleSubmit={handleSubmit}>
144− Authenticate
144+ {!submitting && 'Authenticate'}
145+ {submitting && 'Please check your device'}
145 </Grid.Item>
146 </Grid.Item>
146 </>
147 </>
147 )}
148 )}