Browse Source

Merge pull request #1763 from LedgerHQ/develop

1.3.3
master
Gaëtan Renaudeau 6 years ago
committed by GitHub
parent
commit
09c3c3bc26
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 38
      .eslintrc
  2. 6
      package.json
  3. 2
      src/bridge/EthereumJSBridge.js
  4. 2
      src/bridge/RippleJSBridge.js
  5. 4
      src/commands/libcoreSignAndBroadcast.js
  6. 1
      src/config/cryptocurrencies.js
  7. 4
      src/helpers/libcore.js
  8. 2
      static/i18n/en/app.json
  9. 20
      static/i18n/es/app.json
  10. 20
      static/i18n/fr/app.json
  11. 20
      static/i18n/ja/app.json
  12. 20
      static/i18n/ko/app.json
  13. 20
      static/i18n/ru/app.json
  14. 20
      static/i18n/zh/app.json
  15. 24
      yarn.lock

38
.eslintrc

@ -38,6 +38,7 @@
"jsx-a11y/label-has-for": 0,
"prefer-destructuring": 0,
"new-cap": 0,
"no-continue": 0,
"no-await-in-loop": 0,
"no-restricted-globals": 0,
"no-unused-expressions": 0,
@ -48,7 +49,10 @@
"no-shadow": 0,
"no-underscore-dangle": 0,
"no-console": 2,
"no-unused-vars": ["error", { "argsIgnorePattern": "^_", "vars": "all", "args": "after-used", "ignoreRestSiblings": true }],
"no-unused-vars": [
"error",
{ "argsIgnorePattern": "^_", "vars": "all", "args": "after-used", "ignoreRestSiblings": true }
],
"no-use-before-define": 0,
"no-restricted-syntax": 0,
"no-prototype-builtins": 0,
@ -57,31 +61,31 @@
"react/jsx-curly-brace-presence": 0,
"react/jsx-filename-extension": 0,
"react/jsx-no-target-blank": 0,
"react/jsx-no-literals": [1, {"noStrings": false}],
"react/jsx-no-literals": [1, { "noStrings": false }],
"react/prefer-stateless-function": 0,
"react/require-default-props": 0,
"react/no-multi-comp": 0,
"react/sort-comp": [1, {
order: [
'static-methods',
'lifecycle',
'everything-else',
'render'
]
}]
"react/sort-comp": [
1,
{
"order": ["static-methods", "lifecycle", "everything-else", "render"]
}
]
},
"settings": {
"import/resolver": {
"babel-module": {},
"babel-module": {}
},
"flowtype": {
"onlyFilesWithFlowAnnotation": true,
"onlyFilesWithFlowAnnotation": true
}
},
"overrides": [{
"files": [ "*stories.js" ],
"rules": {
"react/jsx-no-literals": 0
"overrides": [
{
"files": ["*stories.js"],
"rules": {
"react/jsx-no-literals": 0
}
}
}]
]
}

6
package.json

@ -35,13 +35,13 @@
}
},
"dependencies": {
"@ledgerhq/hw-app-btc": "^4.32.0",
"@ledgerhq/hw-app-btc": "^4.34.0",
"@ledgerhq/hw-app-eth": "^4.32.0",
"@ledgerhq/hw-app-xrp": "^4.32.0",
"@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.13.0",
"@ledgerhq/ledger-core": "2.0.0-rc.16",
"@ledgerhq/live-common": "4.14.0",
"animated": "^0.2.2",
"async": "^2.6.1",
"axios": "^0.18.0",

2
src/bridge/EthereumJSBridge.js

@ -13,6 +13,7 @@ import {
getDerivationScheme,
runDerivationScheme,
isIterableDerivationMode,
derivationModeSupportsIndex,
getMandatoryEmptyAccountSkip,
} from '@ledgerhq/live-common/lib/derivation'
import {
@ -314,6 +315,7 @@ const EthereumBridge: WalletBridge<Transaction> = {
const derivationScheme = getDerivationScheme({ derivationMode, currency })
const stopAt = isIterableDerivationMode(derivationMode) ? 255 : 1
for (let index = 0; index < stopAt; index++) {
if (!derivationModeSupportsIndex(derivationMode, index)) continue
const freshAddressPath = runDerivationScheme(derivationScheme, currency, {
account: index,
})

2
src/bridge/RippleJSBridge.js

@ -12,6 +12,7 @@ import {
getDerivationScheme,
runDerivationScheme,
isIterableDerivationMode,
derivationModeSupportsIndex,
} from '@ledgerhq/live-common/lib/derivation'
import {
getAccountPlaceholderName,
@ -314,6 +315,7 @@ const RippleJSBridge: WalletBridge<Transaction> = {
const derivationScheme = getDerivationScheme({ derivationMode, currency })
const stopAt = isIterableDerivationMode(derivationMode) ? 255 : 1
for (let index = 0; index < stopAt; index++) {
if (!derivationModeSupportsIndex(derivationMode, index)) continue
const freshAddressPath = runDerivationScheme(derivationScheme, currency, {
account: index,
})

4
src/commands/libcoreSignAndBroadcast.js

@ -110,7 +110,7 @@ async function signTransaction({
const additionals = []
let expiryHeight
if (currency.id === 'bitcoin_cash' || currency.id === 'bitcoin_gold') additionals.push('bip143')
if (currency.id === 'zcash') {
if (currency.id === 'zcash' || currency.id === 'komodo') {
expiryHeight = Buffer.from([0x00, 0x00, 0x00, 0x00])
if (blockHeight >= 419200) {
additionals.push('sapling')
@ -121,7 +121,7 @@ async function signTransaction({
}
const rawInputs = transaction.getInputs()
const hasExtraData = currency.id === 'zcash'
const hasExtraData = currency.id === 'zcash' || currency.id === 'komodo'
const inputs = await Promise.all(
rawInputs.map(async input => {

1
src/config/cryptocurrencies.js

@ -24,6 +24,7 @@ const supported: CryptoCurrencyIds[] = [
'vertcoin',
'peercoin',
'viacoin',
'stakenet',
'stealthcoin',
'poswallet',
'clubcoin',

4
src/helpers/libcore.js

@ -13,6 +13,7 @@ import {
isSegwitDerivationMode,
isUnsplitDerivationMode,
isIterableDerivationMode,
derivationModeSupportsIndex,
} from '@ledgerhq/live-common/lib/derivation'
import { getCryptoCurrencyById } from '@ledgerhq/live-common/lib/currencies'
import {
@ -258,8 +259,9 @@ async function scanNextAccount(props: {
if (isUnsubscribed()) return []
const isLast = ops.length === 0 || !isIterableDerivationMode(derivationMode)
const skipIndex = !derivationModeSupportsIndex(derivationMode, accountIndex)
if (!isLast || showNewAccount) {
if ((!isLast || showNewAccount) && !skipIndex) {
onAccountScanned(account)
accounts.push(account)
}

2
static/i18n/en/app.json

@ -271,7 +271,7 @@
"identifier": "Identifier",
"mcuTitle": "Updating MCU",
"mcuFirst": "Disconnect the USB cable from your device",
"mcuSecond": "Press the left button and hold it while you reconnect the USB cable until the processing screen appears",
"mcuSecond": "Press the left button and hold it while you reconnect the USB cable until the bootloader screen appears",
"mcuPin": "If asked on device, please enter your pin code to finish the process",
"successTitle": "Firmware updated",
"successText": "You may re-install the apps on your device"

20
static/i18n/es/app.json

@ -451,8 +451,12 @@
},
"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"
"descSettings": "Use this tool to restore your Ledger device if it has become stuck during a firmware update.",
"desc": "Please select the state of your Ledger device.",
"button": "Repair",
"generic": "Bootloader",
"mcuNotGenuine": "MCU not genuine",
"followDeviceRepair": "Follow device repair instructions"
},
"exportLogs": {
"title": "Exportar registros",
@ -851,7 +855,7 @@
"description": "{{message}}"
},
"UnexpectedBootloader": {
"title": "Opps, your device should not be in Bootloader mode",
"title": "Oops, your device should not be in Bootloader mode",
"description": "Please restart your device or contact us"
},
"UserRefusedFirmwareUpdate": {
@ -870,6 +874,10 @@
"title": "Se requiere la actualización de la aplicación.",
"description": "Desinstala y vuelve a instalar la aplicación {{managerAppName}} en el Gestor."
},
"DeviceOnDashboardExpected": {
"title": "Return to Dashboard",
"description": "Please navigate back to Dashboard on your device"
},
"WebsocketConnectionError": {
"title": "Sorry, try again (websocket error)",
"description": null
@ -902,6 +910,10 @@
},
"FeeNotLoaded": {
"title": "Couldn’t load fee rates, please set manual fees"
},
"UnknownMCU": {
"title": "Unknown MCU version",
"description": "Please contact Ledger Support"
}
}
}
}

20
static/i18n/fr/app.json

@ -451,8 +451,12 @@
},
"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"
"descSettings": "Use this tool to restore your Ledger device if it has become stuck during a firmware update.",
"desc": "Please select the state of your Ledger device.",
"button": "Repair",
"generic": "Bootloader",
"mcuNotGenuine": "MCU not genuine",
"followDeviceRepair": "Follow device repair instructions"
},
"exportLogs": {
"title": "Export logs",
@ -851,7 +855,7 @@
"description": "{{message}}"
},
"UnexpectedBootloader": {
"title": "Opps, your device should not be in Bootloader mode",
"title": "Oops, your device should not be in Bootloader mode",
"description": "Please restart your device or contact us"
},
"UserRefusedFirmwareUpdate": {
@ -870,6 +874,10 @@
"title": "Mise à jour de l’application requise",
"description": "Désinstallez et réinstallez l’application {{managerAppName}} dans le gestionnaire."
},
"DeviceOnDashboardExpected": {
"title": "Return to Dashboard",
"description": "Please navigate back to Dashboard on your device"
},
"WebsocketConnectionError": {
"title": "Sorry, try again (websocket error)",
"description": null
@ -902,6 +910,10 @@
},
"FeeNotLoaded": {
"title": "Couldn’t load fee rates, please set manual fees"
},
"UnknownMCU": {
"title": "Unknown MCU version",
"description": "Please contact Ledger Support"
}
}
}
}

20
static/i18n/ja/app.json

@ -451,8 +451,12 @@
},
"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"
"descSettings": "Use this tool to restore your Ledger device if it has become stuck during a firmware update.",
"desc": "Please select the state of your Ledger device.",
"button": "Repair",
"generic": "Bootloader",
"mcuNotGenuine": "MCU not genuine",
"followDeviceRepair": "Follow device repair instructions"
},
"exportLogs": {
"title": "ログのエクスポート",
@ -851,7 +855,7 @@
"description": "{{message}}"
},
"UnexpectedBootloader": {
"title": "Opps, your device should not be in Bootloader mode",
"title": "Oops, your device should not be in Bootloader mode",
"description": "Please restart your device or contact us"
},
"UserRefusedFirmwareUpdate": {
@ -870,6 +874,10 @@
"title": "アプリの更新が必要です",
"description": "マネージャーに{{managerAppName}}アプリをアンインストールし、再インストールします"
},
"DeviceOnDashboardExpected": {
"title": "Return to Dashboard",
"description": "Please navigate back to Dashboard on your device"
},
"WebsocketConnectionError": {
"title": "Sorry, try again (websocket error)",
"description": null
@ -902,6 +910,10 @@
},
"FeeNotLoaded": {
"title": "Couldn’t load fee rates, please set manual fees"
},
"UnknownMCU": {
"title": "Unknown MCU version",
"description": "Please contact Ledger Support"
}
}
}
}

20
static/i18n/ko/app.json

@ -451,8 +451,12 @@
},
"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"
"descSettings": "Use this tool to restore your Ledger device if it has become stuck during a firmware update.",
"desc": "Please select the state of your Ledger device.",
"button": "Repair",
"generic": "Bootloader",
"mcuNotGenuine": "MCU not genuine",
"followDeviceRepair": "Follow device repair instructions"
},
"exportLogs": {
"title": "로그 내보내기",
@ -851,7 +855,7 @@
"description": "{{message}}"
},
"UnexpectedBootloader": {
"title": "Opps, your device should not be in Bootloader mode",
"title": "Oops, your device should not be in Bootloader mode",
"description": "Please restart your device or contact us"
},
"UserRefusedFirmwareUpdate": {
@ -870,6 +874,10 @@
"title": "앱 업데이트가 필요합니다.",
"description": "Manager에서 {{managerAppName}} 앱을 제거한 후 다시 설치하십시오."
},
"DeviceOnDashboardExpected": {
"title": "Return to Dashboard",
"description": "Please navigate back to Dashboard on your device"
},
"WebsocketConnectionError": {
"title": "Sorry, try again (websocket error)",
"description": null
@ -902,6 +910,10 @@
},
"FeeNotLoaded": {
"title": "Couldn’t load fee rates, please set manual fees"
},
"UnknownMCU": {
"title": "Unknown MCU version",
"description": "Please contact Ledger Support"
}
}
}
}

20
static/i18n/ru/app.json

@ -451,8 +451,12 @@
},
"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"
"descSettings": "Use this tool to restore your Ledger device if it has become stuck during a firmware update.",
"desc": "Please select the state of your Ledger device.",
"button": "Repair",
"generic": "Bootloader",
"mcuNotGenuine": "MCU not genuine",
"followDeviceRepair": "Follow device repair instructions"
},
"exportLogs": {
"title": "Экспортировать журналы",
@ -851,7 +855,7 @@
"description": "{{message}}"
},
"UnexpectedBootloader": {
"title": "Opps, your device should not be in Bootloader mode",
"title": "Oops, your device should not be in Bootloader mode",
"description": "Please restart your device or contact us"
},
"UserRefusedFirmwareUpdate": {
@ -870,6 +874,10 @@
"title": "Требуется обновить приложение.",
"description": "Удалите и повторно установите приложение {{managerAppName}} через диспетчер."
},
"DeviceOnDashboardExpected": {
"title": "Return to Dashboard",
"description": "Please navigate back to Dashboard on your device"
},
"WebsocketConnectionError": {
"title": "Sorry, try again (websocket error)",
"description": null
@ -902,6 +910,10 @@
},
"FeeNotLoaded": {
"title": "Couldn’t load fee rates, please set manual fees"
},
"UnknownMCU": {
"title": "Unknown MCU version",
"description": "Please contact Ledger Support"
}
}
}
}

20
static/i18n/zh/app.json

@ -451,8 +451,12 @@
},
"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"
"descSettings": "Use this tool to restore your Ledger device if it has become stuck during a firmware update.",
"desc": "Please select the state of your Ledger device.",
"button": "Repair",
"generic": "Bootloader",
"mcuNotGenuine": "MCU not genuine",
"followDeviceRepair": "Follow device repair instructions"
},
"exportLogs": {
"title": "导出记录",
@ -851,7 +855,7 @@
"description": "{{message}}"
},
"UnexpectedBootloader": {
"title": "Opps, your device should not be in Bootloader mode",
"title": "Oops, your device should not be in Bootloader mode",
"description": "Please restart your device or contact us"
},
"UserRefusedFirmwareUpdate": {
@ -870,6 +874,10 @@
"title": "需要更新应用程序",
"description": "在管理器中卸载并重新安装 {{managerAppName}} 应用程序"
},
"DeviceOnDashboardExpected": {
"title": "Return to Dashboard",
"description": "Please navigate back to Dashboard on your device"
},
"WebsocketConnectionError": {
"title": "Sorry, try again (websocket error)",
"description": null
@ -902,6 +910,10 @@
},
"FeeNotLoaded": {
"title": "Couldn’t load fee rates, please set manual fees"
},
"UnknownMCU": {
"title": "Unknown MCU version",
"description": "Please contact Ledger Support"
}
}
}
}

24
yarn.lock

@ -1690,6 +1690,14 @@
"@ledgerhq/hw-transport" "^4.32.0"
create-hash "^1.1.3"
"@ledgerhq/hw-app-btc@^4.34.0":
version "4.34.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-app-btc/-/hw-app-btc-4.34.0.tgz#0bbc46afd29de04ac6a73582fbf9a09fcf5ed117"
integrity sha512-xR4rH8o8YRvyhnTvb8g89NAJQQqXJkApiFtCvduBamu5V+rDvhHYlFu2B+CU6g8lzLFACMDIqJqXbmwT80AGjw==
dependencies:
"@ledgerhq/hw-transport" "^4.32.0"
create-hash "^1.1.3"
"@ledgerhq/hw-app-eth@^4.32.0":
version "4.32.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-app-eth/-/hw-app-eth-4.32.0.tgz#7d43ca2c7952f1fb726e02c3b4485be10af481a2"
@ -1722,18 +1730,18 @@
dependencies:
events "^3.0.0"
"@ledgerhq/ledger-core@2.0.0-rc.14":
version "2.0.0-rc.14"
resolved "https://registry.yarnpkg.com/@ledgerhq/ledger-core/-/ledger-core-2.0.0-rc.14.tgz#538b771e9d837ce1d26aabaa1dfe58a6b882e3cd"
integrity sha512-WIq6DyOoqtPPt+pS8K6NQ8EJD9GIn/VD1HLehWvJYqZhUf1IOIEIaOqxCnayHMQ/7b4c68xANgmKggUBdQ0M+A==
"@ledgerhq/ledger-core@2.0.0-rc.16":
version "2.0.0-rc.16"
resolved "https://registry.yarnpkg.com/@ledgerhq/ledger-core/-/ledger-core-2.0.0-rc.16.tgz#51f141c0143edb020e38855bf2e2619e3446e74f"
integrity sha512-gmbeXRBg4NSqzH6+EajYTzaQlwN5ugaN1nH0SI6BvRqMfcorxNRE8byfh3F2u+7TNchBW72vOZnKPDShaR9/pQ==
dependencies:
bindings "^1.3.0"
nan "^2.6.2"
"@ledgerhq/live-common@4.13.0":
version "4.13.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/live-common/-/live-common-4.13.0.tgz#7e5eeaf8af2937cd30649b3f6e2094878980f557"
integrity sha512-DSO3CLVdZav7QC2DarbfAXW14z3omRvDFFfwF3URDwKH6nPIVJsE5WqiMpnQ1SL+a1qnevGkF5NLrvwv5bdRmQ==
"@ledgerhq/live-common@4.14.0":
version "4.14.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/live-common/-/live-common-4.14.0.tgz#56ecac0a21f0d77a66a57d5ce9e2159b426e0ec7"
integrity sha512-oKvb/QZrG2XzVvq/IM+73lyw33VlyDu03hmYFCR48U2DGao/SCFOH8J0vQZK/U9VTSqpnC8mEZKQhNOQkf5hoA==
dependencies:
"@aeternity/ledger-app-api" "0.0.4"
"@ledgerhq/errors" "^4.32.0"

Loading…
Cancel
Save