From 7473201b95fb6da341d5bbe55cc944ed2689bd0b Mon Sep 17 00:00:00 2001 From: Juan Cortes Ross Date: Fri, 12 Oct 2018 17:30:13 +0200 Subject: [PATCH 1/2] Addreses the inconsistency between firmware versions displayed https://github.com/LedgerHQ/ledger-live-desktop/issues/1576 --- .../steps/01-step-install-full-firmware.js | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/components/modals/UpdateFirmware/steps/01-step-install-full-firmware.js b/src/components/modals/UpdateFirmware/steps/01-step-install-full-firmware.js index d05af17a..b83fde97 100644 --- a/src/components/modals/UpdateFirmware/steps/01-step-install-full-firmware.js +++ b/src/components/modals/UpdateFirmware/steps/01-step-install-full-firmware.js @@ -128,22 +128,18 @@ class StepFullFirmwareInstall extends PureComponent { } } - formatHashName = (hash: string): string[] => { + formatHashName = (hash: string): string => { if (!hash) { - return [] + return '' } - const length = hash.length - const half = Math.ceil(length / 2) - const start = hash.slice(0, half) - const end = hash.slice(half) - return [start, end] + hash = hash.toUpperCase() + return hash.length > 8 ? `[${hash.slice(0, 4)}...${hash.substr(-4)}]` : hash } renderBody = () => { const { installing } = this.state const { t, firmware } = this.props - return installing ? ( ) : ( @@ -155,11 +151,7 @@ class StepFullFirmwareInstall extends PureComponent { {t('manager.modal.identifier')} -
- {firmware && - firmware.hash && - this.formatHashName(firmware.hash.toUpperCase()).join('\n')} -
+
{firmware && this.formatHashName(firmware.hash)}
From 1599a1739ee128178ef2b2a7390d49e546d766cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Cort=C3=A9s=20Ross?= Date: Sun, 14 Oct 2018 09:41:10 +0200 Subject: [PATCH 2/2] Removed brackets from hash from firmware update --- .../UpdateFirmware/steps/01-step-install-full-firmware.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/modals/UpdateFirmware/steps/01-step-install-full-firmware.js b/src/components/modals/UpdateFirmware/steps/01-step-install-full-firmware.js index b83fde97..154eafb0 100644 --- a/src/components/modals/UpdateFirmware/steps/01-step-install-full-firmware.js +++ b/src/components/modals/UpdateFirmware/steps/01-step-install-full-firmware.js @@ -134,7 +134,7 @@ class StepFullFirmwareInstall extends PureComponent { } hash = hash.toUpperCase() - return hash.length > 8 ? `[${hash.slice(0, 4)}...${hash.substr(-4)}]` : hash + return hash.length > 8 ? `${hash.slice(0, 4)}...${hash.substr(-4)}` : hash } renderBody = () => {