Skip to content
Permalink
Browse files

Add Experimental nodes and Experimental languages

  • Loading branch information...
gre committed May 3, 2019
1 parent 07954ad commit 3c425b41bb70afb053befeef916cb2234998a73b
@@ -82,12 +82,13 @@ DEBUG_ACTION=1
DEBUG_TAB_KEY=1
DEBUG_LIBCORE=1
DEBUG_WS=1
LEDGER_DEBUG_ALL_LANGS=1
SKIP_GENUINE=1
SKIP_ONBOARDING=1
SHOW_LEGACY_NEW_ACCOUNT=1
HIGHLIGHT_I18N=1
EXPERIMENTAL_WS_EXPORT=0
EXPERIMENTAL_LANGUAGES=1
EXPERIMENTAL_EXPLORERS=1
## constants
GET_CALLS_TIMEOUT=30000
@@ -37,16 +37,16 @@
}
},
"dependencies": {
"@ledgerhq/devices": "^4.54.0",
"@ledgerhq/devices": "^4.55.0",
"@ledgerhq/electron-updater": "~3.3.0",
"@ledgerhq/errors": "^4.54.0",
"@ledgerhq/hw-app-btc": "^4.54.0",
"@ledgerhq/hw-app-eth": "^4.54.0",
"@ledgerhq/hw-app-xrp": "^4.54.0",
"@ledgerhq/hw-transport": "^4.54.0",
"@ledgerhq/hw-transport-node-hid": "^4.54.0",
"@ledgerhq/errors": "^4.55.0",
"@ledgerhq/hw-app-btc": "^4.55.0",
"@ledgerhq/hw-app-eth": "^4.55.0",
"@ledgerhq/hw-app-xrp": "^4.55.0",
"@ledgerhq/hw-transport": "^4.55.0",
"@ledgerhq/hw-transport-node-hid": "^4.55.0",
"@ledgerhq/ledger-core": "^2.2.1-rc",
"@ledgerhq/live-common": "^5.0.0-alpha.18",
"@ledgerhq/live-common": "^5.3.0",
"animated": "^0.2.2",
"async": "^2.6.2",
"axios": "^0.18.0",
@@ -7,8 +7,12 @@ import {
fromTokenAccountRaw,
} from '@ledgerhq/live-common/lib/account'
import signAndBroadcast from '@ledgerhq/live-common/lib/libcore/signAndBroadcast'
import type { Transaction } from '@ledgerhq/live-common/lib/libcore/buildTransaction'
import type { AccountRaw, TokenAccountRaw, OperationRaw } from '@ledgerhq/live-common/lib/types'
import type {
Transaction,
AccountRaw,
TokenAccountRaw,
OperationRaw,
} from '@ledgerhq/live-common/lib/types'
import { createCommand, Command } from 'helpers/ipc'

type Input = {
@@ -31,7 +31,7 @@ const languageLabels = {
}

const LanguageSelect = ({ i18n, setLanguage, language, useSystem, t }: Props) => {
const debugLanguage = useEnv('DEBUG_ALL_LANGS')
const debugLanguage = useEnv('EXPERIMENTAL_LANGUAGES')

const languages = [{ value: null, label: t(`language.system`) }].concat(
(debugLanguage ? allLanguages : prodStableLanguages).map(key => ({
@@ -74,7 +74,6 @@ export const DEBUG_TAB_KEY = boolFromEnv('DEBUG_TAB_KEY')
export const DEBUG_LIBCORE = boolFromEnv('DEBUG_LIBCORE')
export const DEBUG_WS = boolFromEnv('DEBUG_WS')
export const DEBUG_SYNC = boolFromEnv('DEBUG_SYNC')
export const LEDGER_DEBUG_ALL_LANGS = boolFromEnv('LEDGER_DEBUG_ALL_LANGS')
export const SKIP_GENUINE = boolFromEnv('SKIP_GENUINE')
export const SKIP_ONBOARDING = boolFromEnv('SKIP_ONBOARDING')
export const SHOW_LEGACY_NEW_ACCOUNT = boolFromEnv('SHOW_LEGACY_NEW_ACCOUNT')
@@ -1,7 +1,7 @@
// @flow
import { LEDGER_DEBUG_ALL_LANGS } from 'config/constants'
import { getEnv } from '@ledgerhq/live-common/lib/env'

export const allLanguages = ['en', 'es', 'fr', 'ja', 'ko', 'ru', 'zh']
export const prodStableLanguages = ['en']
const languages = LEDGER_DEBUG_ALL_LANGS ? allLanguages : prodStableLanguages
export default languages
export const getLanguages = () =>
getEnv('EXPERIMENTAL_LANGUAGES') ? allLanguages : prodStableLanguages
@@ -19,6 +19,18 @@ export type FeatureToggle = {
export type Feature = FeatureCommon & FeatureToggle

export const experimentalFeatures: Feature[] = [
{
type: 'toggle',
name: 'EXPERIMENTAL_LANGUAGES',
title: 'Translation testing',
description: 'Adds unreleased languages to the language list in the general settings tab.',
},
{
type: 'toggle',
name: 'EXPERIMENTAL_EXPLORERS',
title: 'Experimental nodes',
description: "Connect to Ledger's new blockchain nodes.",
},
{
type: 'toggle',
name: 'MANAGER_DEV_MODE',
@@ -39,13 +51,6 @@ export const experimentalFeatures: Feature[] = [
description:
'Alternative USB implementation that might help solve USB issues. Enabling this feature might create UI glitches.',
},
{
shadow: true,
type: 'toggle',
name: 'EXPERIMENTAL_EXPLORERS',
title: 'Experimental nodes',
description: "Connect to Ledger's new blockchain nodes.",
},
{
shadow: true,
type: 'toggle',
@@ -55,12 +60,6 @@ export const experimentalFeatures: Feature[] = [
title: 'Pre-release apps',
description: 'Enable pre-release apps in the Manager',
},
{
type: 'toggle',
name: 'DEBUG_ALL_LANGS',
title: 'Translation testing',
description: 'Adds unreleased languages to the language list in the general settings tab.',
},
]

const lsKey = 'experimentalFlags'
@@ -6,7 +6,7 @@ import {
getCryptoCurrencyById,
getFiatCurrencyByTicker,
} from '@ledgerhq/live-common/lib/currencies'
import languages from 'config/languages'
import { getLanguages } from 'config/languages'
import { createSelector } from 'reselect'
import type { InputSelector as Selector } from 'reselect'
import type { CryptoCurrency, Currency, Account } from '@ledgerhq/live-common/lib/types'
@@ -176,6 +176,7 @@ export const lastUsedVersionSelector = (state: State): string => state.settings.
export const langAndRegionSelector = (
state: State,
): { language: string, region: ?string, useSystem: boolean } => {
const languages = getLanguages()
let { language, region } = state.settings
if (language && languages.includes(language)) {
return { language, region, useSystem: false }
142 yarn.lock
@@ -1487,6 +1487,13 @@
core-js "^2.5.6"
regenerator-runtime "^0.11.1"

"@babel/runtime@^7.1.2":
version "7.4.4"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.4.4.tgz#dc2e34982eb236803aa27a07fea6857af1b9171d"
integrity sha512-w0+uT71b6Yi7i5SE0co4NioIpSYS6lLiXvCzWzGSKvpK5vdQtCbICHMj+gbAKAOtxiV6HsVh/MBdaF9EQ6faSg==
dependencies:
regenerator-runtime "^0.13.2"

"@babel/template@7.0.0-beta.44":
version "7.0.0-beta.44"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.44.tgz#f8832f4fdcee5d59bf515e595fc5106c529b394f"
@@ -1663,12 +1670,12 @@
camelcase "^5.0.0"
prettier "^1.13.7"

"@ledgerhq/devices@^4.54.0":
version "4.54.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-4.54.0.tgz#6345f6c0e6cf8fc16ac1a476df610e69d273cd76"
integrity sha512-v6E4PK6bej/CmMSMVasFWWy1iyh42XaHmUpp5i992/n+PiVQQL5qnQlgXpCq2ZoFinfpnFc7y2lv3qSxAqQimQ==
"@ledgerhq/devices@^4.55.0":
version "4.55.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-4.55.0.tgz#c1fb7e33d38f2352f4991ea9fa4987e90238ee21"
integrity sha512-N8Wd429toqZvhW/xa2szjmVDP0c8X/VUaUnldNXNDgZutVwCMyMKLiuIBK34urkEBaHR0bpbqw6/SlcwGpDaJg==
dependencies:
"@ledgerhq/errors" "^4.54.0"
"@ledgerhq/errors" "^4.55.0"

"@ledgerhq/electron-updater@~3.3.0":
version "3.3.0"
@@ -1686,61 +1693,61 @@
semver "^5.6.0"
source-map-support "^0.5.9"

"@ledgerhq/errors@^4.54.0":
version "4.54.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-4.54.0.tgz#e0655188714ca3750d3964faa0f01ebf76ecd455"
integrity sha512-BbAiJHzw/EtIp/HBhDUTbAGj+1cYGGmnrlXSccIxt/MFwcgrX2KgPFbTIAiJJYmPkUSdY4eucyrB9YohzfGCkw==
"@ledgerhq/errors@^4.55.0":
version "4.55.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-4.55.0.tgz#5fbef730abbcf3fd8a37838f37a08eada11720fd"
integrity sha512-XzygAQYafn7Bqj52WT2cCtNdS7CfcEd8f2e5KOxll0eYgT9ZgAHpdQUZvRAxmgeP+007zO4lseJ2bSdWbxb/rw==

"@ledgerhq/hw-app-btc@^4.54.0":
version "4.54.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-app-btc/-/hw-app-btc-4.54.0.tgz#664d4b7778c96befdbe58cc6f76246ff4ee388f9"
integrity sha512-vh5yMkB27AhmxH9GB+Auu911KHAJB6yDhjNv917F/EPXYygyoX+YhBjGe5VGavEf2brnb0h+Ut9ShuBk5La5Cw==
"@ledgerhq/hw-app-btc@^4.55.0":
version "4.55.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-app-btc/-/hw-app-btc-4.55.0.tgz#2c0bb1aa25208d8d945b52646da8262f263f4fca"
integrity sha512-gmUl6ahNtiFOgiwBQ+P1C2bkZReMxALUye7+eR2qisVrPdChMJQPCFgnkACsvPY1njVJPSbtaCKDlNRz/70QDQ==
dependencies:
"@ledgerhq/hw-transport" "^4.54.0"
"@ledgerhq/hw-transport" "^4.55.0"
create-hash "^1.1.3"

"@ledgerhq/hw-app-eth@4.54.0", "@ledgerhq/hw-app-eth@^4.54.0":
version "4.54.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-app-eth/-/hw-app-eth-4.54.0.tgz#e0603eece9284dab6f981b84d7ca8adf570299b1"
integrity sha512-uWavxpcQ2S/HcGoSehAyvMY92b3lrSANc1gQ2umqBbAZCi7RNhM3KnIbtzvq2gPkqHF1xJyT2cf1QEvYrMGmCg==
"@ledgerhq/hw-app-eth@4.55.0", "@ledgerhq/hw-app-eth@^4.55.0":
version "4.55.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-app-eth/-/hw-app-eth-4.55.0.tgz#fbaf866dac12a58b0801995b1700f0ac02ca6c44"
integrity sha512-MRWHgQVClC/J8LPtWOCPsAdqYKNc/nykm6LpyERwzcM3LH2NWQbkF30pLzjgkgmhdYb03TrpuN1rxOfYCwicTw==
dependencies:
"@ledgerhq/errors" "^4.54.0"
"@ledgerhq/hw-transport" "^4.54.0"
"@ledgerhq/errors" "^4.55.0"
"@ledgerhq/hw-transport" "^4.55.0"

"@ledgerhq/hw-app-xrp@^4.54.0":
version "4.54.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-app-xrp/-/hw-app-xrp-4.54.0.tgz#4a111bdf3c5430cfbf163958657ab5680337fe33"
integrity sha512-W0iyuK3jmE6rSuFgyDJ2F5Sg6//uauurP61ktjy1cCk+gT61ijBS4J6MiJVxgzotcDoyD8xDO9+WI0q64NhCIg==
"@ledgerhq/hw-app-xrp@^4.55.0":
version "4.55.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-app-xrp/-/hw-app-xrp-4.55.0.tgz#eb2d060544fe5cd60599b0599b31f219f2e304a2"
integrity sha512-Yjk01It7KGzjFfLGw8mZyt7BuMW6WPjlTWcbXO0zwu4pt5ZhzwYG+A+58vyuMEROUcNXAV93v1cLUKYh98vhLw==
dependencies:
"@ledgerhq/hw-transport" "^4.54.0"
"@ledgerhq/hw-transport" "^4.55.0"
bip32-path "0.4.2"

"@ledgerhq/hw-transport-mocker@^4.54.0":
version "4.54.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-mocker/-/hw-transport-mocker-4.54.0.tgz#2bd8532a44bcf1731c726d83bb37af3a052d7557"
integrity sha512-zMjxxVyjwzAhEzm0ft53cWHtpKTSL9qZ1TOZExIi8xK8ABNbHnTt3PyJ43YSx94ZsnRzT4d/xEzp5hoq5azUBA==
"@ledgerhq/hw-transport-mocker@^4.55.0":
version "4.55.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-mocker/-/hw-transport-mocker-4.55.0.tgz#bf00a8628fb157bb60238e5a69da69be66d3580a"
integrity sha512-W4MNSEzWrC/1/qPfwHEJoa/GVdl6OSqprebliXiQYC5F+Sg16GCy6jB+QccwnbBS3M4RwyuLRrWLWbl1v/i0RQ==
dependencies:
"@ledgerhq/hw-transport" "^4.54.0"
"@ledgerhq/hw-transport" "^4.55.0"

"@ledgerhq/hw-transport-node-hid@^4.54.0":
version "4.54.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-node-hid/-/hw-transport-node-hid-4.54.0.tgz#6cc71be527fb011daf8d716fe18936637408bb89"
integrity sha512-xJrKTsSL2BRdQ+DJMoB67rFr2mUolDcIDg2H2MX1gMBPYR9HmZs433S3qd8yW+CELTbDp6pQoEIEDUGU7ore/g==
"@ledgerhq/hw-transport-node-hid@^4.55.0":
version "4.55.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-node-hid/-/hw-transport-node-hid-4.55.0.tgz#84245caa2005f63a9688a45d28224336d0d61a93"
integrity sha512-sIbz1zLfjPnoC/BG+0pdGTZW1r1ScDHYOugRwxR3Ws9Dix8JafloA0hCkz3Pu2q4okuZ4+uWTZqHJZSjLmNh9Q==
dependencies:
"@ledgerhq/devices" "^4.54.0"
"@ledgerhq/errors" "^4.54.0"
"@ledgerhq/hw-transport" "^4.54.0"
"@ledgerhq/devices" "^4.55.0"
"@ledgerhq/errors" "^4.55.0"
"@ledgerhq/hw-transport" "^4.55.0"
lodash "^4.17.11"
node-hid "^0.7.7"
usb "^1.5.0"

"@ledgerhq/hw-transport@^4.54.0":
version "4.54.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-4.54.0.tgz#befa14a4a3ba5810ca6b7ffbd6b94bce861ddf88"
integrity sha512-9UCr35O0Fn7ib0R9BsgY9jXHL/bGCQF66GYOD2GCwLWDVnK5eVewS6J+ljxhWOIsV75OcqJtylRO0mAGOD6tWg==
"@ledgerhq/hw-transport@^4.55.0":
version "4.55.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-4.55.0.tgz#76249204d9571245ff3efb354a618f94b2634f33"
integrity sha512-X01EmZaLfDVHOUe5X2RDjqg/d6zuRPWZvwKV0rMp9GQXJNucmL6kbTV+5vjXMWTqRSL5Zul4lK8y63Nh7o9WBQ==
dependencies:
"@ledgerhq/devices" "^4.54.0"
"@ledgerhq/errors" "^4.54.0"
"@ledgerhq/devices" "^4.55.0"
"@ledgerhq/errors" "^4.55.0"
events "^3.0.0"

"@ledgerhq/ledger-core@^2.2.1-rc":
@@ -1751,17 +1758,17 @@
bindings "^1.3.0"
nan "^2.6.2"

"@ledgerhq/live-common@^5.0.0-alpha.18":
version "5.0.0-alpha.18"
resolved "https://registry.yarnpkg.com/@ledgerhq/live-common/-/live-common-5.0.0-alpha.18.tgz#a042e1bc001d662cf19e3d4c98fce47f97f7d99b"
integrity sha512-fT+9PTETVeyV8IH940M7ZYABoAW0yOOgyVBQDrmnhsQ/eGECRq/J7AzzgGjQ47vQvg/Ji6ovJknXlIK+gxgphA==
dependencies:
"@ledgerhq/errors" "^4.54.0"
"@ledgerhq/hw-app-btc" "^4.54.0"
"@ledgerhq/hw-app-eth" "4.54.0"
"@ledgerhq/hw-app-xrp" "^4.54.0"
"@ledgerhq/hw-transport" "^4.54.0"
"@ledgerhq/hw-transport-mocker" "^4.54.0"
"@ledgerhq/live-common@^5.3.0":
version "5.3.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/live-common/-/live-common-5.3.0.tgz#1c992068376478d9378d54b6cd42eb2c80ae2d4b"
integrity sha512-AavFVQm8MRJLPWiaig5+2pUEmobD4xNQfvUJNRMescj3ueMQj1Fup6elhQhlhDzEIB+XVbMSNnhT3YtSnjKV8w==
dependencies:
"@ledgerhq/errors" "^4.55.0"
"@ledgerhq/hw-app-btc" "^4.55.0"
"@ledgerhq/hw-app-eth" "4.55.0"
"@ledgerhq/hw-app-xrp" "^4.55.0"
"@ledgerhq/hw-transport" "^4.55.0"
"@ledgerhq/hw-transport-mocker" "^4.55.0"
bignumber.js "^8.1.1"
compressjs gre/compressjs#hermit
eip55 "^1.0.3"
@@ -8902,6 +8909,13 @@ hoist-non-react-statics@^2.3.1, hoist-non-react-statics@^2.5.0:
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47"
integrity sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==

hoist-non-react-statics@^3.1.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz#b09178f0122184fb95acf525daaecb4d8f45958b"
integrity sha512-0XsbTXxgiaCDYDIWFcwkmerZPSwywfUqYmwT4jzewKTQSWoE6FCMoUVOeBJWK3E/CrWbxRG3m5GzY4lnIwGRBA==
dependencies:
react-is "^16.7.0"

home-or-tmp@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8"
babel-runtime "^6.26.0"
is-dom "^1.0.9"

react-is@^16.3.1, react-is@^16.8.1, react-is@^16.8.6:
react-is@^16.3.1, react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.6:
version "16.8.6"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16"
integrity sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA==
dependencies:
prop-types "^15.5.8"

react-redux@5:
version "5.1.1"
resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-5.1.1.tgz#88e368682c7fa80e34e055cd7ac56f5936b0f52f"
integrity sha512-LE7Ned+cv5qe7tMV5BPYkGQ5Lpg8gzgItK07c67yHvJ8t0iaD9kPFPAli/mYkiyJYrs2pJgExR2ZgsGqlrOApg==
dependencies:
"@babel/runtime" "^7.1.2"
hoist-non-react-statics "^3.1.0"
invariant "^2.2.4"
loose-envify "^1.1.0"
prop-types "^15.6.1"
react-is "^16.6.0"
react-lifecycles-compat "^3.0.0"

react-redux@5.0.7:
version "5.0.7"
resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-5.0.7.tgz#0dc1076d9afb4670f993ffaef44b8f8c1155a4c8"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9"
integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==

regenerator-runtime@^0.13.2:
version "0.13.2"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz#32e59c9a6fb9b1a4aff09b4930ca2d4477343447"
integrity sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==

regenerator-transform@^0.10.0:
version "0.10.1"
resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd"

0 comments on commit 3c425b4

Please sign in to comment.
You can’t perform that action at this time.