diff --git a/package.json b/package.json index ee3e074b..7882120a 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "@ledgerhq/hw-transport": "^4.32.0", "@ledgerhq/hw-transport-node-hid": "^4.32.0", "@ledgerhq/ledger-core": "2.0.0-rc.14", - "@ledgerhq/live-common": "4.8.0-beta.23", + "@ledgerhq/live-common": "4.8.0-beta.24", "animated": "^0.2.2", "async": "^2.6.1", "axios": "^0.18.0", diff --git a/scripts/postinstall.sh b/scripts/postinstall.sh index 0d302214..8724ab95 100755 --- a/scripts/postinstall.sh +++ b/scripts/postinstall.sh @@ -55,7 +55,7 @@ function installFlowTyped { "Failed installing flow-typed definitions" runJob \ - "rm flow-typed/npm/{react-i18next_v7.x.x.js,styled-components_v3.x.x.js,redux_*,winston*}" \ + "rm flow-typed/npm/{react-i18next_v7.x.x.js,styled-components_v3.x.x.js,redux_*,winston*,react-hot-loader_*}" \ "Removing broken flow-typed definitions" \ "Removed broken flow-typed definitions" \ "Failed removing broken flow-typed definitions" diff --git a/src/actions/general.js b/src/actions/general.js index 1c984625..a7d187eb 100644 --- a/src/actions/general.js +++ b/src/actions/general.js @@ -33,11 +33,8 @@ const selectAccountsBalanceAndOrder = createStructuredSelector({ export const refreshAccountsOrdering = () => (dispatch: *, getState: *) => { const all = selectAccountsBalanceAndOrder(getState()) - const allRatesAvailable = all.accountsBtcBalance.every(b => !!b) - if (allRatesAvailable) { - dispatch({ - type: 'DB:REORDER_ACCOUNTS', - payload: sortAccounts(all), - }) - } + dispatch({ + type: 'DB:REORDER_ACCOUNTS', + payload: sortAccounts(all), + }) } diff --git a/src/components/DashboardPage/AccountsOrder.js b/src/components/DashboardPage/AccountsOrder.js index f0697d31..9716e4a4 100644 --- a/src/components/DashboardPage/AccountsOrder.js +++ b/src/components/DashboardPage/AccountsOrder.js @@ -118,7 +118,7 @@ class AccountsOrder extends Component { {item.label} - {order === 'desc' ? : } + {order === 'asc' ? : } ) diff --git a/src/components/FeesField/BitcoinKind.js b/src/components/FeesField/BitcoinKind.js index 2b102792..81c2ea9b 100644 --- a/src/components/FeesField/BitcoinKind.js +++ b/src/components/FeesField/BitcoinKind.js @@ -120,6 +120,7 @@ class FeesField extends Component { if (selectedItem.feePerByte.isZero() && input.current) { patch.isFocused = true input.current.select() + onChange(selectedItem.feePerByte) } } this.setState(patch) diff --git a/src/components/Idler.js b/src/components/Idler.js index 12444110..7029d79f 100644 --- a/src/components/Idler.js +++ b/src/components/Idler.js @@ -40,7 +40,11 @@ class Idler extends PureComponent { lastAction: number = -1 - debounceOnChange = debounce(_ => this.idleTimeHandler(), 1000) + idleTimeHandler = () => { + this.lastAction = Date.now() + } + + debounceOnChange = debounce(this.idleTimeHandler, 1000, { maxWait: 1000, leading: true }) checkForAutoLock = _ => { const timeout = this.props.autoLockTimeout @@ -51,10 +55,6 @@ class Idler extends PureComponent { } } - idleTimeHandler = _ => { - this.lastAction = Date.now() - } - render() { return null } diff --git a/src/components/SettingsPage/index.js b/src/components/SettingsPage/index.js index 9c773cd7..be00eb22 100644 --- a/src/components/SettingsPage/index.js +++ b/src/components/SettingsPage/index.js @@ -7,7 +7,6 @@ import { Trans, translate } from 'react-i18next' import type { T } from 'types/common' import { Switch, Route } from 'react-router' import type { RouterHistory, Match, Location } from 'react-router' -import { EXPERIMENTAL_TOOLS_SETTINGS } from 'config/constants' import { accountsSelector } from 'reducers/accounts' import Pills from 'components/base/Pills' import Box from 'components/base/Box' @@ -48,6 +47,11 @@ class SettingsPage extends PureComponent { label: , value: SectionCurrencies, }, + { + key: 'export', + label: , + value: SectionExport, + }, { key: 'about', label: , @@ -60,14 +64,6 @@ class SettingsPage extends PureComponent { }, ] - if (EXPERIMENTAL_TOOLS_SETTINGS) { - this._items.splice(2, 0, { - key: 'tool', - label: 'Experimental Tools', - value: SectionExport, - }) - } - this.state = { tab: this.getCurrentTab({ url: props.match.url, pathname: props.location.pathname }), } diff --git a/src/config/constants.js b/src/config/constants.js index 8194e649..8f43698d 100644 --- a/src/config/constants.js +++ b/src/config/constants.js @@ -84,7 +84,6 @@ export const DISABLE_ACTIVITY_INDICATORS = boolFromEnv('DISABLE_ACTIVITY_INDICAT export const EXPERIMENTAL_CENTER_MODAL = boolFromEnv('EXPERIMENTAL_CENTER_MODAL') export const EXPERIMENTAL_FIRMWARE_UPDATE = boolFromEnv('EXPERIMENTAL_FIRMWARE_UPDATE') export const EXPERIMENTAL_HTTP_ON_RENDERER = boolFromEnv('EXPERIMENTAL_HTTP_ON_RENDERER') -export const EXPERIMENTAL_TOOLS_SETTINGS = boolFromEnv('EXPERIMENTAL_TOOLS_SETTINGS') export const EXPERIMENTAL_MARKET_INDICATOR_SETTINGS = boolFromEnv( 'EXPERIMENTAL_MARKET_INDICATOR_SETTINGS', ) diff --git a/src/internals/index.js b/src/internals/index.js index e40fbdb7..c13b56a8 100644 --- a/src/internals/index.js +++ b/src/internals/index.js @@ -89,7 +89,7 @@ process.on('message', m => { }) }, error: error => { - logger.warn('Command error:', error) + logger.warn('Command error:', { error }) delete subscriptions[requestId] logger.onCmd('cmd.ERROR', id, Date.now() - startTime, error) process.send({ @@ -100,7 +100,7 @@ process.on('message', m => { }, }) } catch (error) { - logger.warn('Command error:', error) + logger.warn('Command impl error:', { error }) delete subscriptions[requestId] logger.onCmd('cmd.ERROR', id, Date.now() - startTime, error) process.send({ diff --git a/static/i18n/es/app.json b/static/i18n/es/app.json index be44663d..e2815a60 100644 --- a/static/i18n/es/app.json +++ b/static/i18n/es/app.json @@ -258,9 +258,13 @@ }, "modal": { "steps": { - "updateMCU": "Actualización MCU" + "updateMCU": "Firmware update", + "osu": "Installing OSU...", + "flash-mcu": "MCU updating...", + "flash-bootloader": "Bootloader updating...", + "firmware": "Firmware updating...", + "flash": "Flashing your device..." }, - "installing": "Actualizando el firmware...", "confirmIdentifier": "Comprobar el identificador", "confirmIdentifierText": "Verify that the identifier on your device is the same as the identifier below. Press the right button and enter your PIN code to confirm", "identifier": "Identificador", @@ -444,6 +448,11 @@ "desc": "Visualiza los datos de usuario guardados en tu ordenador, incluidas tus cuentas, caché y ajustes.", "btn": "Ver" }, + "repairDevice": { + "title": "Repair your Ledger device", + "desc": "If you encountered some issue while updating your device and cannot resume the update process, you can try this option to repair your device.", + "button": "Repair" + }, "exportLogs": { "title": "Exportar registros", "desc": "Exportar los registros de Ledger Live puede ser necesario para solucionar problemas.", @@ -840,6 +849,10 @@ "title": "Something went wrong, please reconnect your device", "description": "{{message}}" }, + "UnexpectedBootloader": { + "title": "Opps, your device should not be in Bootloader mode", + "description": "Please restart your device or contact us" + }, "UserRefusedFirmwareUpdate": { "title": "Actualización del firmware rechazada en el dispositivo. ", "description": "Inténtalo de nuevo o ponte en contacto con Soporte de Ledger." diff --git a/static/i18n/fr/app.json b/static/i18n/fr/app.json index d1e911f3..e3c4885c 100644 --- a/static/i18n/fr/app.json +++ b/static/i18n/fr/app.json @@ -258,9 +258,13 @@ }, "modal": { "steps": { - "updateMCU": "Mise à jour du MCU" + "updateMCU": "Firmware update", + "osu": "Installing OSU...", + "flash-mcu": "MCU updating...", + "flash-bootloader": "Bootloader updating...", + "firmware": "Firmware updating...", + "flash": "Flashing your device..." }, - "installing": "Firmware updating...", "confirmIdentifier": "Vérifiez l’identificateur.", "confirmIdentifierText": "Verify that the identifier on your device is the same as the identifier below. Press the right button and enter your PIN code to confirm", "identifier": "Identifier", @@ -444,6 +448,11 @@ "desc": "Consultez les données utilisateur stockées sur votre ordinateur, y compris vos comptes, caches et paramètres.", "btn": "Affichage" }, + "repairDevice": { + "title": "Repair your Ledger device", + "desc": "If you encountered some issue while updating your device and cannot resume the update process, you can try this option to repair your device.", + "button": "Repair" + }, "exportLogs": { "title": "Export logs", "desc": "L’export des journaux Ledger Live pourra être nécessaire aux fins de dépannage.", @@ -840,6 +849,10 @@ "title": "Something went wrong, please reconnect your device", "description": "{{message}}" }, + "UnexpectedBootloader": { + "title": "Opps, your device should not be in Bootloader mode", + "description": "Please restart your device or contact us" + }, "UserRefusedFirmwareUpdate": { "title": "Mise à jour du firmware refusée sur l’appareil", "description": "Veuillez essayer à nouveau ou contacter l’assistance Ledger." diff --git a/static/i18n/ja/app.json b/static/i18n/ja/app.json index 81191ac5..b6957c97 100644 --- a/static/i18n/ja/app.json +++ b/static/i18n/ja/app.json @@ -258,9 +258,13 @@ }, "modal": { "steps": { - "updateMCU": "MCU更新" + "updateMCU": "Firmware update", + "osu": "Installing OSU...", + "flash-mcu": "MCU updating...", + "flash-bootloader": "Bootloader updating...", + "firmware": "Firmware updating...", + "flash": "Flashing your device..." }, - "installing": "ファームウェアを更新しています...", "confirmIdentifier": "識別子を検証してください", "confirmIdentifierText": "Verify that the identifier on your device is the same as the identifier below. Press the right button and enter your PIN code to confirm", "identifier": "識別子", @@ -444,6 +448,11 @@ "desc": "お使いのコンピューターに保存されたアカウントやキャッシュ、設定といったユーザーデータを表示します。", "btn": "表示" }, + "repairDevice": { + "title": "Repair your Ledger device", + "desc": "If you encountered some issue while updating your device and cannot resume the update process, you can try this option to repair your device.", + "button": "Repair" + }, "exportLogs": { "title": "ログのエクスポート", "desc": "トラブルシューティングのためにLedger Liveログをエクスポートする必要が生じることがあります。", @@ -840,6 +849,10 @@ "title": "Something went wrong, please reconnect your device", "description": "{{message}}" }, + "UnexpectedBootloader": { + "title": "Opps, your device should not be in Bootloader mode", + "description": "Please restart your device or contact us" + }, "UserRefusedFirmwareUpdate": { "title": "ファームウェアのアップデートが機器で却下されました", "description": "再試行するか、Ledger Supportにご連絡ください。" diff --git a/static/i18n/ko/app.json b/static/i18n/ko/app.json index 766dcfa3..800006ba 100644 --- a/static/i18n/ko/app.json +++ b/static/i18n/ko/app.json @@ -258,9 +258,13 @@ }, "modal": { "steps": { - "updateMCU": "MCU 업데이트" + "updateMCU": "Firmware update", + "osu": "Installing OSU...", + "flash-mcu": "MCU updating...", + "flash-bootloader": "Bootloader updating...", + "firmware": "Firmware updating...", + "flash": "Flashing your device..." }, - "installing": "펌웨어 업데이트 중...", "confirmIdentifier": "식별자 확인", "confirmIdentifierText": "Verify that the identifier on your device is the same as the identifier below. Press the right button and enter your PIN code to confirm", "identifier": "식별자", @@ -444,6 +448,11 @@ "desc": "계정, 캐시 및 설정을 포함하여 컴퓨터에 저장된 사용자 데이터를 봅니다.", "btn": "보기" }, + "repairDevice": { + "title": "Repair your Ledger device", + "desc": "If you encountered some issue while updating your device and cannot resume the update process, you can try this option to repair your device.", + "button": "Repair" + }, "exportLogs": { "title": "로그 내보내기", "desc": "문제 해결을 위해 Ledger Live 로그 내보내기가 필요할 수 있습니다.", @@ -840,6 +849,10 @@ "title": "Something went wrong, please reconnect your device", "description": "{{message}}" }, + "UnexpectedBootloader": { + "title": "Opps, your device should not be in Bootloader mode", + "description": "Please restart your device or contact us" + }, "UserRefusedFirmwareUpdate": { "title": "장치에서 펌웨어 업데이트가 거부되었습니다.", "description": "다시 시도하거나 Ledger 지원 센터에 문의하십시오." diff --git a/static/i18n/ru/app.json b/static/i18n/ru/app.json index 3ca34fb2..9770d5b0 100644 --- a/static/i18n/ru/app.json +++ b/static/i18n/ru/app.json @@ -258,9 +258,13 @@ }, "modal": { "steps": { - "updateMCU": "Обновление микроконтроллера" + "updateMCU": "Firmware update", + "osu": "Installing OSU...", + "flash-mcu": "MCU updating...", + "flash-bootloader": "Bootloader updating...", + "firmware": "Firmware updating...", + "flash": "Flashing your device..." }, - "installing": "Обновление встроенного ПО...", "confirmIdentifier": "Проверить идентификатор", "confirmIdentifierText": "Verify that the identifier on your device is the same as the identifier below. Press the right button and enter your PIN code to confirm", "identifier": "Идентификатор", @@ -444,6 +448,11 @@ "desc": "Просматривайте пользовательские данные, хранящиеся на компьютере, в том числе счета, файлы кэша и настройки.", "btn": "Просмотреть" }, + "repairDevice": { + "title": "Repair your Ledger device", + "desc": "If you encountered some issue while updating your device and cannot resume the update process, you can try this option to repair your device.", + "button": "Repair" + }, "exportLogs": { "title": "Экспортировать журналы", "desc": "Экспорт журналов Ledger Live может понадобиться в целях устранения неисправностей.", @@ -840,6 +849,10 @@ "title": "Something went wrong, please reconnect your device", "description": "{{message}}" }, + "UnexpectedBootloader": { + "title": "Opps, your device should not be in Bootloader mode", + "description": "Please restart your device or contact us" + }, "UserRefusedFirmwareUpdate": { "title": "Не удалось обновить встроенное ПО на устройстве.", "description": "Повторите попытку или обратитесь в службу поддержки компании Ledger." diff --git a/static/i18n/zh/app.json b/static/i18n/zh/app.json index 1f2ae671..be84ec2c 100644 --- a/static/i18n/zh/app.json +++ b/static/i18n/zh/app.json @@ -258,9 +258,13 @@ }, "modal": { "steps": { - "updateMCU": "MCU update" + "updateMCU": "Firmware update", + "osu": "Installing OSU...", + "flash-mcu": "MCU updating...", + "flash-bootloader": "Bootloader updating...", + "firmware": "Firmware updating...", + "flash": "Flashing your device..." }, - "installing": "正在更新固件...", "confirmIdentifier": "Verify the identifier", "confirmIdentifierText": "Verify that the identifier on your device is the same as the identifier below. Press the right button and enter your PIN code to confirm", "identifier": "Identifier", @@ -444,6 +448,11 @@ "desc": "查看存储在您的计算机上的用户数据,包括您的账户、缓存和设置。", "btn": "查看" }, + "repairDevice": { + "title": "Repair your Ledger device", + "desc": "If you encountered some issue while updating your device and cannot resume the update process, you can try this option to repair your device.", + "button": "Repair" + }, "exportLogs": { "title": "导出记录", "desc": "故障排除可能需要导出 Ledger Live 记录。", @@ -840,6 +849,10 @@ "title": "Something went wrong, please reconnect your device", "description": "{{message}}" }, + "UnexpectedBootloader": { + "title": "Opps, your device should not be in Bootloader mode", + "description": "Please restart your device or contact us" + }, "UserRefusedFirmwareUpdate": { "title": "设备上的固件更新被拒", "description": "请重试或联系 Ledger 支持人员" diff --git a/yarn.lock b/yarn.lock index ac63d684..93048390 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1725,10 +1725,10 @@ bindings "^1.3.0" nan "^2.6.2" -"@ledgerhq/live-common@4.8.0-beta.23": - version "4.8.0-beta.23" - resolved "https://registry.yarnpkg.com/@ledgerhq/live-common/-/live-common-4.8.0-beta.23.tgz#a6f0d5016116204ffba92648fb5b1f6fd0458196" - integrity sha512-sgwto1g8VyNSYAr7kimvuX+hlYN9r1FvArCD1JvUtjo9I57Ucj8TMyusfHLhne1exivrjuoNdVJIZaR3YJUvXg== +"@ledgerhq/live-common@4.8.0-beta.24": + version "4.8.0-beta.24" + resolved "https://registry.yarnpkg.com/@ledgerhq/live-common/-/live-common-4.8.0-beta.24.tgz#5f30ea9b63c1a561120eb6757b6663d1c20b67e0" + integrity sha512-guW9LH/kAk9bmZ8dJV0OlzNYOoE8Jo0VPxZuYCLuzO09Xr41oBfEARdSnVNV6+n/L/BDc8EZSlixpbxMKZ9yFQ== dependencies: "@aeternity/ledger-app-api" "0.0.4" "@ledgerhq/hw-app-btc" "^4.32.0"