Browse Source

Merge pull request #1730 from LedgerHQ/develop

1.3.0
master
Gaëtan Renaudeau 6 years ago
committed by GitHub
parent
commit
878d8c2663
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      package.json
  2. 2
      scripts/postinstall.sh
  3. 11
      src/actions/general.js
  4. 2
      src/components/DashboardPage/AccountsOrder.js
  5. 1
      src/components/FeesField/BitcoinKind.js
  6. 10
      src/components/Idler.js
  7. 14
      src/components/SettingsPage/index.js
  8. 1
      src/config/constants.js
  9. 4
      src/internals/index.js
  10. 17
      static/i18n/es/app.json
  11. 17
      static/i18n/fr/app.json
  12. 17
      static/i18n/ja/app.json
  13. 17
      static/i18n/ko/app.json
  14. 17
      static/i18n/ru/app.json
  15. 17
      static/i18n/zh/app.json
  16. 8
      yarn.lock

2
package.json

@ -41,7 +41,7 @@
"@ledgerhq/hw-transport": "^4.32.0", "@ledgerhq/hw-transport": "^4.32.0",
"@ledgerhq/hw-transport-node-hid": "^4.32.0", "@ledgerhq/hw-transport-node-hid": "^4.32.0",
"@ledgerhq/ledger-core": "2.0.0-rc.14", "@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", "animated": "^0.2.2",
"async": "^2.6.1", "async": "^2.6.1",
"axios": "^0.18.0", "axios": "^0.18.0",

2
scripts/postinstall.sh

@ -55,7 +55,7 @@ function installFlowTyped {
"Failed installing flow-typed definitions" "Failed installing flow-typed definitions"
runJob \ 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" \ "Removing broken flow-typed definitions" \
"Removed broken flow-typed definitions" \ "Removed broken flow-typed definitions" \
"Failed removing broken flow-typed definitions" "Failed removing broken flow-typed definitions"

11
src/actions/general.js

@ -33,11 +33,8 @@ const selectAccountsBalanceAndOrder = createStructuredSelector({
export const refreshAccountsOrdering = () => (dispatch: *, getState: *) => { export const refreshAccountsOrdering = () => (dispatch: *, getState: *) => {
const all = selectAccountsBalanceAndOrder(getState()) const all = selectAccountsBalanceAndOrder(getState())
const allRatesAvailable = all.accountsBtcBalance.every(b => !!b) dispatch({
if (allRatesAvailable) { type: 'DB:REORDER_ACCOUNTS',
dispatch({ payload: sortAccounts(all),
type: 'DB:REORDER_ACCOUNTS', })
payload: sortAccounts(all),
})
}
} }

2
src/components/DashboardPage/AccountsOrder.js

@ -118,7 +118,7 @@ class AccountsOrder extends Component<Props> {
<BoldToggle isBold={isActive}>{item.label}</BoldToggle> <BoldToggle isBold={isActive}>{item.label}</BoldToggle>
</Box> </Box>
<OrderIcon isActive={isActive}> <OrderIcon isActive={isActive}>
{order === 'desc' ? <IconArrowUp size={14} /> : <IconArrowDown size={14} />} {order === 'asc' ? <IconArrowUp size={14} /> : <IconArrowDown size={14} />}
</OrderIcon> </OrderIcon>
</DropDownItem> </DropDownItem>
) )

1
src/components/FeesField/BitcoinKind.js

@ -120,6 +120,7 @@ class FeesField extends Component<OwnProps, State> {
if (selectedItem.feePerByte.isZero() && input.current) { if (selectedItem.feePerByte.isZero() && input.current) {
patch.isFocused = true patch.isFocused = true
input.current.select() input.current.select()
onChange(selectedItem.feePerByte)
} }
} }
this.setState(patch) this.setState(patch)

10
src/components/Idler.js

@ -40,7 +40,11 @@ class Idler extends PureComponent<Props> {
lastAction: number = -1 lastAction: number = -1
debounceOnChange = debounce(_ => this.idleTimeHandler(), 1000) idleTimeHandler = () => {
this.lastAction = Date.now()
}
debounceOnChange = debounce(this.idleTimeHandler, 1000, { maxWait: 1000, leading: true })
checkForAutoLock = _ => { checkForAutoLock = _ => {
const timeout = this.props.autoLockTimeout const timeout = this.props.autoLockTimeout
@ -51,10 +55,6 @@ class Idler extends PureComponent<Props> {
} }
} }
idleTimeHandler = _ => {
this.lastAction = Date.now()
}
render() { render() {
return null return null
} }

14
src/components/SettingsPage/index.js

@ -7,7 +7,6 @@ import { Trans, translate } from 'react-i18next'
import type { T } from 'types/common' import type { T } from 'types/common'
import { Switch, Route } from 'react-router' import { Switch, Route } from 'react-router'
import type { RouterHistory, Match, Location } from 'react-router' import type { RouterHistory, Match, Location } from 'react-router'
import { EXPERIMENTAL_TOOLS_SETTINGS } from 'config/constants'
import { accountsSelector } from 'reducers/accounts' import { accountsSelector } from 'reducers/accounts'
import Pills from 'components/base/Pills' import Pills from 'components/base/Pills'
import Box from 'components/base/Box' import Box from 'components/base/Box'
@ -48,6 +47,11 @@ class SettingsPage extends PureComponent<Props, State> {
label: <Trans i18nKey="settings.tabs.currencies" />, label: <Trans i18nKey="settings.tabs.currencies" />,
value: SectionCurrencies, value: SectionCurrencies,
}, },
{
key: 'export',
label: <Trans i18nKey="settings.tabs.export" />,
value: SectionExport,
},
{ {
key: 'about', key: 'about',
label: <Trans i18nKey="settings.tabs.about" />, label: <Trans i18nKey="settings.tabs.about" />,
@ -60,14 +64,6 @@ class SettingsPage extends PureComponent<Props, State> {
}, },
] ]
if (EXPERIMENTAL_TOOLS_SETTINGS) {
this._items.splice(2, 0, {
key: 'tool',
label: 'Experimental Tools',
value: SectionExport,
})
}
this.state = { this.state = {
tab: this.getCurrentTab({ url: props.match.url, pathname: props.location.pathname }), tab: this.getCurrentTab({ url: props.match.url, pathname: props.location.pathname }),
} }

1
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_CENTER_MODAL = boolFromEnv('EXPERIMENTAL_CENTER_MODAL')
export const EXPERIMENTAL_FIRMWARE_UPDATE = boolFromEnv('EXPERIMENTAL_FIRMWARE_UPDATE') export const EXPERIMENTAL_FIRMWARE_UPDATE = boolFromEnv('EXPERIMENTAL_FIRMWARE_UPDATE')
export const EXPERIMENTAL_HTTP_ON_RENDERER = boolFromEnv('EXPERIMENTAL_HTTP_ON_RENDERER') 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( export const EXPERIMENTAL_MARKET_INDICATOR_SETTINGS = boolFromEnv(
'EXPERIMENTAL_MARKET_INDICATOR_SETTINGS', 'EXPERIMENTAL_MARKET_INDICATOR_SETTINGS',
) )

4
src/internals/index.js

@ -89,7 +89,7 @@ process.on('message', m => {
}) })
}, },
error: error => { error: error => {
logger.warn('Command error:', error) logger.warn('Command error:', { error })
delete subscriptions[requestId] delete subscriptions[requestId]
logger.onCmd('cmd.ERROR', id, Date.now() - startTime, error) logger.onCmd('cmd.ERROR', id, Date.now() - startTime, error)
process.send({ process.send({
@ -100,7 +100,7 @@ process.on('message', m => {
}, },
}) })
} catch (error) { } catch (error) {
logger.warn('Command error:', error) logger.warn('Command impl error:', { error })
delete subscriptions[requestId] delete subscriptions[requestId]
logger.onCmd('cmd.ERROR', id, Date.now() - startTime, error) logger.onCmd('cmd.ERROR', id, Date.now() - startTime, error)
process.send({ process.send({

17
static/i18n/es/app.json

@ -258,9 +258,13 @@
}, },
"modal": { "modal": {
"steps": { "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", "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", "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", "identifier": "Identificador",
@ -444,6 +448,11 @@
"desc": "Visualiza los datos de usuario guardados en tu ordenador, incluidas tus cuentas, caché y ajustes.", "desc": "Visualiza los datos de usuario guardados en tu ordenador, incluidas tus cuentas, caché y ajustes.",
"btn": "Ver" "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": { "exportLogs": {
"title": "Exportar registros", "title": "Exportar registros",
"desc": "Exportar los registros de Ledger Live puede ser necesario para solucionar problemas.", "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", "title": "Something went wrong, please reconnect your device",
"description": "{{message}}" "description": "{{message}}"
}, },
"UnexpectedBootloader": {
"title": "Opps, your device should not be in Bootloader mode",
"description": "Please restart your device or contact us"
},
"UserRefusedFirmwareUpdate": { "UserRefusedFirmwareUpdate": {
"title": "Actualización del firmware rechazada en el dispositivo. ", "title": "Actualización del firmware rechazada en el dispositivo. ",
"description": "Inténtalo de nuevo o ponte en contacto con Soporte de Ledger." "description": "Inténtalo de nuevo o ponte en contacto con Soporte de Ledger."

17
static/i18n/fr/app.json

@ -258,9 +258,13 @@
}, },
"modal": { "modal": {
"steps": { "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.", "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", "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", "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.", "desc": "Consultez les données utilisateur stockées sur votre ordinateur, y compris vos comptes, caches et paramètres.",
"btn": "Affichage" "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": { "exportLogs": {
"title": "Export logs", "title": "Export logs",
"desc": "L’export des journaux Ledger Live pourra être nécessaire aux fins de dépannage.", "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", "title": "Something went wrong, please reconnect your device",
"description": "{{message}}" "description": "{{message}}"
}, },
"UnexpectedBootloader": {
"title": "Opps, your device should not be in Bootloader mode",
"description": "Please restart your device or contact us"
},
"UserRefusedFirmwareUpdate": { "UserRefusedFirmwareUpdate": {
"title": "Mise à jour du firmware refusée sur l’appareil", "title": "Mise à jour du firmware refusée sur l’appareil",
"description": "Veuillez essayer à nouveau ou contacter l’assistance Ledger." "description": "Veuillez essayer à nouveau ou contacter l’assistance Ledger."

17
static/i18n/ja/app.json

@ -258,9 +258,13 @@
}, },
"modal": { "modal": {
"steps": { "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": "識別子を検証してください", "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", "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": "お使いのコンピューターに保存されたアカウントやキャッシュ、設定といったユーザーデータを表示します。", "desc": "お使いのコンピューターに保存されたアカウントやキャッシュ、設定といったユーザーデータを表示します。",
"btn": "表示" "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": { "exportLogs": {
"title": "ログのエクスポート", "title": "ログのエクスポート",
"desc": "トラブルシューティングのためにLedger Liveログをエクスポートする必要が生じることがあります。", "desc": "トラブルシューティングのためにLedger Liveログをエクスポートする必要が生じることがあります。",
@ -840,6 +849,10 @@
"title": "Something went wrong, please reconnect your device", "title": "Something went wrong, please reconnect your device",
"description": "{{message}}" "description": "{{message}}"
}, },
"UnexpectedBootloader": {
"title": "Opps, your device should not be in Bootloader mode",
"description": "Please restart your device or contact us"
},
"UserRefusedFirmwareUpdate": { "UserRefusedFirmwareUpdate": {
"title": "ファームウェアのアップデートが機器で却下されました", "title": "ファームウェアのアップデートが機器で却下されました",
"description": "再試行するか、Ledger Supportにご連絡ください。" "description": "再試行するか、Ledger Supportにご連絡ください。"

17
static/i18n/ko/app.json

@ -258,9 +258,13 @@
}, },
"modal": { "modal": {
"steps": { "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": "식별자 확인", "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", "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": "계정, 캐시 및 설정을 포함하여 컴퓨터에 저장된 사용자 데이터를 봅니다.", "desc": "계정, 캐시 및 설정을 포함하여 컴퓨터에 저장된 사용자 데이터를 봅니다.",
"btn": "보기" "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": { "exportLogs": {
"title": "로그 내보내기", "title": "로그 내보내기",
"desc": "문제 해결을 위해 Ledger Live 로그 내보내기가 필요할 수 있습니다.", "desc": "문제 해결을 위해 Ledger Live 로그 내보내기가 필요할 수 있습니다.",
@ -840,6 +849,10 @@
"title": "Something went wrong, please reconnect your device", "title": "Something went wrong, please reconnect your device",
"description": "{{message}}" "description": "{{message}}"
}, },
"UnexpectedBootloader": {
"title": "Opps, your device should not be in Bootloader mode",
"description": "Please restart your device or contact us"
},
"UserRefusedFirmwareUpdate": { "UserRefusedFirmwareUpdate": {
"title": "장치에서 펌웨어 업데이트가 거부되었습니다.", "title": "장치에서 펌웨어 업데이트가 거부되었습니다.",
"description": "다시 시도하거나 Ledger 지원 센터에 문의하십시오." "description": "다시 시도하거나 Ledger 지원 센터에 문의하십시오."

17
static/i18n/ru/app.json

@ -258,9 +258,13 @@
}, },
"modal": { "modal": {
"steps": { "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": "Проверить идентификатор", "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", "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": "Просматривайте пользовательские данные, хранящиеся на компьютере, в том числе счета, файлы кэша и настройки.", "desc": "Просматривайте пользовательские данные, хранящиеся на компьютере, в том числе счета, файлы кэша и настройки.",
"btn": "Просмотреть" "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": { "exportLogs": {
"title": "Экспортировать журналы", "title": "Экспортировать журналы",
"desc": "Экспорт журналов Ledger Live может понадобиться в целях устранения неисправностей.", "desc": "Экспорт журналов Ledger Live может понадобиться в целях устранения неисправностей.",
@ -840,6 +849,10 @@
"title": "Something went wrong, please reconnect your device", "title": "Something went wrong, please reconnect your device",
"description": "{{message}}" "description": "{{message}}"
}, },
"UnexpectedBootloader": {
"title": "Opps, your device should not be in Bootloader mode",
"description": "Please restart your device or contact us"
},
"UserRefusedFirmwareUpdate": { "UserRefusedFirmwareUpdate": {
"title": "Не удалось обновить встроенное ПО на устройстве.", "title": "Не удалось обновить встроенное ПО на устройстве.",
"description": "Повторите попытку или обратитесь в службу поддержки компании Ledger." "description": "Повторите попытку или обратитесь в службу поддержки компании Ledger."

17
static/i18n/zh/app.json

@ -258,9 +258,13 @@
}, },
"modal": { "modal": {
"steps": { "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", "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", "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", "identifier": "Identifier",
@ -444,6 +448,11 @@
"desc": "查看存储在您的计算机上的用户数据,包括您的账户、缓存和设置。", "desc": "查看存储在您的计算机上的用户数据,包括您的账户、缓存和设置。",
"btn": "查看" "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": { "exportLogs": {
"title": "导出记录", "title": "导出记录",
"desc": "故障排除可能需要导出 Ledger Live 记录。", "desc": "故障排除可能需要导出 Ledger Live 记录。",
@ -840,6 +849,10 @@
"title": "Something went wrong, please reconnect your device", "title": "Something went wrong, please reconnect your device",
"description": "{{message}}" "description": "{{message}}"
}, },
"UnexpectedBootloader": {
"title": "Opps, your device should not be in Bootloader mode",
"description": "Please restart your device or contact us"
},
"UserRefusedFirmwareUpdate": { "UserRefusedFirmwareUpdate": {
"title": "设备上的固件更新被拒", "title": "设备上的固件更新被拒",
"description": "请重试或联系 Ledger 支持人员" "description": "请重试或联系 Ledger 支持人员"

8
yarn.lock

@ -1725,10 +1725,10 @@
bindings "^1.3.0" bindings "^1.3.0"
nan "^2.6.2" nan "^2.6.2"
"@ledgerhq/live-common@4.8.0-beta.23": "@ledgerhq/live-common@4.8.0-beta.24":
version "4.8.0-beta.23" version "4.8.0-beta.24"
resolved "https://registry.yarnpkg.com/@ledgerhq/live-common/-/live-common-4.8.0-beta.23.tgz#a6f0d5016116204ffba92648fb5b1f6fd0458196" resolved "https://registry.yarnpkg.com/@ledgerhq/live-common/-/live-common-4.8.0-beta.24.tgz#5f30ea9b63c1a561120eb6757b6663d1c20b67e0"
integrity sha512-sgwto1g8VyNSYAr7kimvuX+hlYN9r1FvArCD1JvUtjo9I57Ucj8TMyusfHLhne1exivrjuoNdVJIZaR3YJUvXg== integrity sha512-guW9LH/kAk9bmZ8dJV0OlzNYOoE8Jo0VPxZuYCLuzO09Xr41oBfEARdSnVNV6+n/L/BDc8EZSlixpbxMKZ9yFQ==
dependencies: dependencies:
"@aeternity/ledger-app-api" "0.0.4" "@aeternity/ledger-app-api" "0.0.4"
"@ledgerhq/hw-app-btc" "^4.32.0" "@ledgerhq/hw-app-btc" "^4.32.0"

Loading…
Cancel
Save