on master help sign in
improve hardware login copy
commit2448f54756b7042efbbb1b5cb637cef812c393bb authorLiam Fitzgerald <liam@urizen.co> dateSat 28 Mar 2020, 11:39 (7 years ago) parent89094fe
3 files changed+9−7
src/views/Login/Ledger.js+3−2 src/views/Login/Metamask.js+2−2 src/views/Login/Trezor.js+4−3
src/views/Login/Ledger.js+3−2
@@ -173,7 +173,7 @@ export default function Ledger({ className, goHome }) {
173173 onSubmit={onSubmit}
174174 afterSubmit={goHome}
175175 initialValues={initialValues}>
176− {({ handleSubmit }) => (
176+ {({ handleSubmit, submitting }) => (
177177 <>
178178 <Condition when="useCustomPath" is={true}>
179179 <Grid.Item full as={HdPathInput} name="hdpath" label="HD Path" />
@@ -214,7 +214,8 @@ export default function Ledger({ className, goHome }) {
214214 <Grid.Item full as={FormError} />
215215
216216 <Grid.Item full as={SubmitButton} handleSubmit={handleSubmit}>
217− Authenticate
217+ {!submitting && 'Authenticate'}
218+ {submitting && 'Please check your device'}
218219 </Grid.Item>
219220 </>
220221 )}
src/views/Login/Metamask.js+2−2
@@ -6,7 +6,7 @@ import { FORM_ERROR } from 'final-form';
66import { useWallet } from 'store/wallet';
77import { useNetwork } from 'store/network';
88
9−import { WALLET_TYPES } from 'lib/wallet';
9+import { WALLET_TYPES, abbreviateAddress } from 'lib/wallet';
1010import { MetamaskWallet } from 'lib/metamask';
1111import { getAuthToken } from 'lib/authToken';
1212import useLoginView from 'lib/useLoginView';
@@ -76,7 +76,7 @@ function Login({ onSubmit, goHome }) {
7676 <Grid.Item full as={SubmitButton} handleSubmit={handleSubmit}>
7777 Login
7878 {window.ethereum.selectedAddress &&
79− ' as ' + window.ethereum.selectedAddress}
79+ ' as ' + abbreviateAddress(window.ethereum.selectedAddress)}
8080 </Grid.Item>
8181 )}
8282 </BridgeForm>
src/views/Login/Trezor.js+4−3
@@ -8,7 +8,7 @@ import { Text, Grid, H5, CheckboxInput, SelectInput } from 'indigo-react';
88
99import { useWallet } from 'store/wallet';
1010
11−import { TREZOR_PATH, trezorSignMessage } from 'lib/trezor';
11+import { TREZOR_PATH } from 'lib/trezor';
1212import { WALLET_TYPES } from 'lib/wallet';
1313import useLoginView from 'lib/useLoginView';
1414import { getAuthToken } from 'lib/authToken';
@@ -113,7 +113,7 @@ export default function Trezor({ className, goHome }) {
113113 onSubmit={onSubmit}
114114 afterSubmit={goHome}
115115 initialValues={initialValues}>
116− {({ handleSubmit }) => (
116+ {({ handleSubmit, submitting }) => (
117117 <>
118118 <Condition when="useCustomPath" is={true}>
119119 <Grid.Item full as={HdPathInput} name="hdPath" label="HD Path" />
@@ -141,7 +141,8 @@ export default function Trezor({ className, goHome }) {
141141 <Grid.Item full as={FormError} />
142142
143143 <Grid.Item full as={SubmitButton} handleSubmit={handleSubmit}>
144− Authenticate
144+ {!submitting && 'Authenticate'}
145+ {submitting && 'Please check your device'}
145146 </Grid.Item>
146147 </>
147148 )}