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..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 @@ -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)}