mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Provide instructions for users switching from Ledger Live to WebHID (#12519)
This commit is contained in:
parent
e067379f48
commit
a83d50a489
@ -1290,6 +1290,9 @@
|
|||||||
"ledgerTimeout": {
|
"ledgerTimeout": {
|
||||||
"message": "Ledger Live is taking too long to respond or connection timeout. Make sure Ledger Live app is opened and your device is unlocked."
|
"message": "Ledger Live is taking too long to respond or connection timeout. Make sure Ledger Live app is opened and your device is unlocked."
|
||||||
},
|
},
|
||||||
|
"ledgerTransportChangeWarning": {
|
||||||
|
"message": "If your Ledger Live app is open, please disconnect any open Ledger Live connection and close the Ledger Live app."
|
||||||
|
},
|
||||||
"ledgerWebHIDNotConnectedErrorMessage": {
|
"ledgerWebHIDNotConnectedErrorMessage": {
|
||||||
"message": "The ledger device was not connected. If you wish to connect your Ledger, please click 'Continue' again and approve HID connection",
|
"message": "The ledger device was not connected. If you wish to connect your Ledger, please click 'Continue' again and approve HID connection",
|
||||||
"description": "An error message shown to the user during the hardware connect flow."
|
"description": "An error message shown to the user during the hardware connect flow."
|
||||||
|
@ -7,6 +7,7 @@ import TextField from '../../../components/ui/text-field';
|
|||||||
import Button from '../../../components/ui/button';
|
import Button from '../../../components/ui/button';
|
||||||
import { MOBILE_SYNC_ROUTE } from '../../../helpers/constants/routes';
|
import { MOBILE_SYNC_ROUTE } from '../../../helpers/constants/routes';
|
||||||
import Dropdown from '../../../components/ui/dropdown';
|
import Dropdown from '../../../components/ui/dropdown';
|
||||||
|
import Dialog from '../../../components/ui/dialog';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
LEDGER_TRANSPORT_TYPES,
|
LEDGER_TRANSPORT_TYPES,
|
||||||
@ -53,6 +54,7 @@ export default class AdvancedTab extends PureComponent {
|
|||||||
lockTimeError: '',
|
lockTimeError: '',
|
||||||
ipfsGateway: this.props.ipfsGateway,
|
ipfsGateway: this.props.ipfsGateway,
|
||||||
ipfsGatewayError: '',
|
ipfsGatewayError: '',
|
||||||
|
showLedgerTransportWarning: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
renderMobileSync() {
|
renderMobileSync() {
|
||||||
@ -489,6 +491,12 @@ export default class AdvancedTab extends PureComponent {
|
|||||||
options={transportTypeOptions}
|
options={transportTypeOptions}
|
||||||
selectedOption={ledgerTransportType}
|
selectedOption={ledgerTransportType}
|
||||||
onChange={async (transportType) => {
|
onChange={async (transportType) => {
|
||||||
|
if (
|
||||||
|
ledgerTransportType === LEDGER_TRANSPORT_TYPES.LIVE &&
|
||||||
|
transportType === LEDGER_TRANSPORT_TYPES.WEBHID
|
||||||
|
) {
|
||||||
|
this.setState({ showLedgerTransportWarning: true });
|
||||||
|
}
|
||||||
setLedgerLivePreference(transportType);
|
setLedgerLivePreference(transportType);
|
||||||
if (
|
if (
|
||||||
transportType === LEDGER_TRANSPORT_TYPES.WEBHID &&
|
transportType === LEDGER_TRANSPORT_TYPES.WEBHID &&
|
||||||
@ -500,6 +508,13 @@ export default class AdvancedTab extends PureComponent {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
{this.state.showLedgerTransportWarning ? (
|
||||||
|
<Dialog type="message">
|
||||||
|
<div className="settings-page__content-item-dialog">
|
||||||
|
{t('ledgerTransportChangeWarning')}
|
||||||
|
</div>
|
||||||
|
</Dialog>
|
||||||
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -190,6 +190,10 @@
|
|||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
& .dialog {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__content-label {
|
&__content-label {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user