Gaëtan Renaudeau
6 years ago
No known key found for this signature in database
GPG Key ID: 7B66B85F042E5451
3 changed files with
20 additions and
16 deletions
src/components/SettingsPage/RepairDeviceButton.js
src/components/base/Modal/RepairModal.js
static/i18n/en/app.json
@ -60,9 +60,6 @@ class RepairDeviceButton extends PureComponent<Props, State> {
} )
}
repairMcu = ( ) => this . repair ( '0.8' )
repairGeneric = ( ) => this . repair ( )
render ( ) {
const { t } = this . props
const { opened , isLoading , error , progress } = this . state
@ -79,8 +76,7 @@ class RepairDeviceButton extends PureComponent<Props, State> {
isOpened = { opened }
onClose = { this . close }
onReject = { this . close }
onRepair = { this . repairGeneric }
onRepairMCU = { this . repairMcu }
repair = { this . repair }
isLoading = { isLoading }
title = { t ( 'settings.repairDevice.title' ) }
desc = { t ( 'settings.repairDevice.desc' ) }
@ -129,8 +129,7 @@ type Props = {
confirmText ? : string ,
cancelText ? : string ,
onReject : Function ,
onRepair : Function ,
onRepairMCU : Function ,
repair : ? string => * ,
t : T ,
isLoading ? : boolean ,
analyticsName : string ,
@ -149,8 +148,7 @@ class RepairModal extends PureComponent<Props> {
confirmText ,
isDanger ,
onReject ,
onRepair ,
onRepairMCU ,
repair ,
isLoading ,
renderIcon ,
t ,
@ -183,22 +181,31 @@ class RepairModal extends PureComponent<Props> {
{ error ? null : (
< >
< Button
onClick = { onRepair }
onClick = { ( ) => repair ( ) }
primary = { ! isDanger }
danger = { isDanger }
isLoading = { isLoading }
disabled = { isLoading }
>
{ t ( 'settings.repairDevice.repair ' ) }
{ t ( 'settings.repairDevice.generic ' ) }
< / B u t t o n >
< Button
onClick = { onRepair }
onClick = { ( ) => repair ( "0.8" ) }
primary = { ! isDanger }
danger = { isDanger }
isLoading = { isLoading }
disabled = { isLoading }
>
{ t ( 'settings.repairDevice.mcu' ) }
{ t ( 'settings.repairDevice.0_8' ) }
< / B u t t o n >
< Button
onClick = { ( ) => repair ( "0.9" ) }
primary = { ! isDanger }
danger = { isDanger }
isLoading = { isLoading }
disabled = { isLoading }
>
{ t ( 'settings.repairDevice.0_9' ) }
< / B u t t o n >
< / >
) }
@ -453,8 +453,9 @@
"title" : "Repair your Ledger device" ,
"desc" : "If you encountered some issue while updating your Ledger Nano S and cannot resume the update process, you can try this option to repair your device." ,
"button" : "Repair" ,
"repair" : "Stuck in 'Bootloader'" ,
"mcu" : "Stuck in 'MCU not genuine'"
"generic" : "'Bootloader'" ,
"0_8" : "'MCU not genuine'" ,
"0_9" : "'follow repair instruction'"
} ,
"exportLogs" : {
"title" : "Export logs" ,
@ -906,4 +907,4 @@
"title" : "Couldn’t load fee rates, please set manual fees"
}
}
}
}