diff --git a/src/commands/debugAppInfosForCurrency.js b/src/commands/debugAppInfosForCurrency.js
index 8ba70516..dd576dda 100644
--- a/src/commands/debugAppInfosForCurrency.js
+++ b/src/commands/debugAppInfosForCurrency.js
@@ -1,10 +1,10 @@
// @flow
import { getCryptoCurrencyById } from '@ledgerhq/live-common/lib/currencies'
+import debugAppInfosForCurrency from '@ledgerhq/live-common/lib/hw/debugAppInfosForCurrency'
import { createCommand, Command } from 'helpers/ipc'
import { from } from 'rxjs'
import { withDevice } from '@ledgerhq/live-common/lib/hw/deviceAccess'
-import debugAppInfosForCurrency from 'helpers/debugAppInfosForCurrency'
type Input = {
currencyId: string,
diff --git a/src/commands/getCurrentFirmware.js b/src/commands/getCurrentFirmware.js
deleted file mode 100644
index d4ae0c86..00000000
--- a/src/commands/getCurrentFirmware.js
+++ /dev/null
@@ -1,21 +0,0 @@
-// @flow
-
-import { createCommand, Command } from 'helpers/ipc'
-import { fromPromise } from 'rxjs/observable/fromPromise'
-
-import getCurrentFirmware from 'helpers/devices/getCurrentFirmware'
-import type { FinalFirmware } from 'helpers/types'
-
-type Input = {
- deviceId: string | number,
- fullVersion: string,
- provider: number,
-}
-
-type Result = FinalFirmware
-
-const cmd: Command = createCommand('getCurrentFirmware', data =>
- fromPromise(getCurrentFirmware(data)),
-)
-
-export default cmd
diff --git a/src/commands/getDeviceInfo.js b/src/commands/getDeviceInfo.js
index 22135389..a0529571 100644
--- a/src/commands/getDeviceInfo.js
+++ b/src/commands/getDeviceInfo.js
@@ -3,9 +3,8 @@
import { createCommand, Command } from 'helpers/ipc'
import { from } from 'rxjs'
import { withDevice } from '@ledgerhq/live-common/lib/hw/deviceAccess'
-
-import getDeviceInfo from 'helpers/devices/getDeviceInfo'
-import type { DeviceInfo } from 'helpers/types'
+import getDeviceInfo from '@ledgerhq/live-common/lib/hw/getDeviceInfo'
+import type { DeviceInfo } from '@ledgerhq/live-common/lib/types/manager'
type Input = {
devicePath: string,
diff --git a/src/commands/getIsGenuine.js b/src/commands/getIsGenuine.js
index 406d7cac..edc357e1 100644
--- a/src/commands/getIsGenuine.js
+++ b/src/commands/getIsGenuine.js
@@ -1,11 +1,12 @@
// @flow
import { createCommand, Command } from 'helpers/ipc'
-import { from } from 'rxjs'
-import type { DeviceInfo } from 'helpers/types'
-
-import getIsGenuine from 'helpers/devices/getIsGenuine'
+import { of } from 'rxjs'
+import { delay } from 'rxjs/operators'
+import genuineCheck from '@ledgerhq/live-common/lib/hw/genuineCheck'
import { withDevice } from '@ledgerhq/live-common/lib/hw/deviceAccess'
+import type { DeviceInfo } from '@ledgerhq/live-common/lib/types/manager'
+import { SKIP_GENUINE } from 'config/constants'
type Input = {
devicePath: string,
@@ -14,7 +15,10 @@ type Input = {
type Result = string
const cmd: Command = createCommand('getIsGenuine', ({ devicePath, deviceInfo }) =>
- withDevice(devicePath)(transport => from(getIsGenuine(transport, deviceInfo))),
+ withDevice(devicePath)(
+ transport =>
+ SKIP_GENUINE ? of('0000').pipe(delay(1000)) : genuineCheck(transport, deviceInfo),
+ ),
)
export default cmd
diff --git a/src/commands/getMemInfo.js b/src/commands/getMemInfo.js
deleted file mode 100644
index acaf532f..00000000
--- a/src/commands/getMemInfo.js
+++ /dev/null
@@ -1,19 +0,0 @@
-// @flow
-
-import { createCommand, Command } from 'helpers/ipc'
-import { from } from 'rxjs'
-
-import { withDevice } from '@ledgerhq/live-common/lib/hw/deviceAccess'
-import getMemInfo from 'helpers/devices/getMemInfo'
-
-type Input = {
- devicePath: string,
-}
-
-type Result = *
-
-const cmd: Command = createCommand('getMemInfo', ({ devicePath }) =>
- withDevice(devicePath)(transport => from(getMemInfo(transport))),
-)
-
-export default cmd
diff --git a/src/commands/index.js b/src/commands/index.js
index a55d2bb4..ac155d41 100644
--- a/src/commands/index.js
+++ b/src/commands/index.js
@@ -9,12 +9,9 @@ import firmwareMain from 'commands/firmwareMain'
import firmwareRepair from 'commands/firmwareRepair'
import getAddress from 'commands/getAddress'
import getDeviceInfo from 'commands/getDeviceInfo'
-import getCurrentFirmware from 'commands/getCurrentFirmware'
import getIsGenuine from 'commands/getIsGenuine'
import getLatestFirmwareForDevice from 'commands/getLatestFirmwareForDevice'
-import getMemInfo from 'commands/getMemInfo'
import installApp from 'commands/installApp'
-import isDashboardOpen from 'commands/isDashboardOpen'
import killInternalProcess from 'commands/killInternalProcess'
import libcoreGetFees from 'commands/libcoreGetFees'
import libcoreGetVersion from 'commands/libcoreGetVersion'
@@ -23,9 +20,6 @@ import libcoreScanFromXPUB from 'commands/libcoreScanFromXPUB'
import libcoreSignAndBroadcast from 'commands/libcoreSignAndBroadcast'
import libcoreSyncAccount from 'commands/libcoreSyncAccount'
import libcoreValidAddress from 'commands/libcoreValidAddress'
-import listApps from 'commands/listApps'
-import listAppVersions from 'commands/listAppVersions'
-import listCategories from 'commands/listCategories'
import listenDevices from 'commands/listenDevices'
import ping from 'commands/ping'
import signTransaction from 'commands/signTransaction'
@@ -41,12 +35,9 @@ const all: Array> = [
firmwareRepair,
getAddress,
getDeviceInfo,
- getCurrentFirmware,
getIsGenuine,
getLatestFirmwareForDevice,
- getMemInfo,
installApp,
- isDashboardOpen,
killInternalProcess,
libcoreGetFees,
libcoreGetVersion,
@@ -55,9 +46,6 @@ const all: Array> = [
libcoreSignAndBroadcast,
libcoreSyncAccount,
libcoreValidAddress,
- listApps,
- listAppVersions,
- listCategories,
listenDevices,
ping,
signTransaction,
diff --git a/src/commands/isDashboardOpen.js b/src/commands/isDashboardOpen.js
deleted file mode 100644
index ce9c48db..00000000
--- a/src/commands/isDashboardOpen.js
+++ /dev/null
@@ -1,19 +0,0 @@
-// @flow
-
-import { createCommand, Command } from 'helpers/ipc'
-import { from } from 'rxjs'
-import { withDevice } from '@ledgerhq/live-common/lib/hw/deviceAccess'
-
-import isDashboardOpen from '../helpers/devices/isDashboardOpen'
-
-type Input = {
- devicePath: string,
-}
-
-type Result = boolean
-
-const cmd: Command = createCommand('isDashboardOpen', ({ devicePath }) =>
- withDevice(devicePath)(transport => from(isDashboardOpen(transport))),
-)
-
-export default cmd
diff --git a/src/commands/listAppVersions.js b/src/commands/listAppVersions.js
deleted file mode 100644
index a802b2c6..00000000
--- a/src/commands/listAppVersions.js
+++ /dev/null
@@ -1,15 +0,0 @@
-// @flow
-
-import { createCommand, Command } from 'helpers/ipc'
-import { fromPromise } from 'rxjs/observable/fromPromise'
-import type { DeviceInfo, ApplicationVersion } from 'helpers/types'
-
-import listAppVersions from 'helpers/apps/listAppVersions'
-
-type Result = Array
-
-const cmd: Command = createCommand('listAppVersions', deviceInfo =>
- fromPromise(listAppVersions(deviceInfo)),
-)
-
-export default cmd
diff --git a/src/commands/listApps.js b/src/commands/listApps.js
deleted file mode 100644
index 13f78609..00000000
--- a/src/commands/listApps.js
+++ /dev/null
@@ -1,15 +0,0 @@
-// @flow
-
-import { createCommand, Command } from 'helpers/ipc'
-import { fromPromise } from 'rxjs/observable/fromPromise'
-
-import listApps from 'helpers/apps/listApps'
-import type { Application } from 'helpers/types'
-
-type Input = void
-
-type Result = Array
-
-const cmd: Command = createCommand('listApps', () => fromPromise(listApps()))
-
-export default cmd
diff --git a/src/commands/listCategories.js b/src/commands/listCategories.js
deleted file mode 100644
index 641b4ad8..00000000
--- a/src/commands/listCategories.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// @flow
-
-import { createCommand, Command } from 'helpers/ipc'
-import { fromPromise } from 'rxjs/observable/fromPromise'
-
-import listCategories from 'helpers/apps/listCategories'
-import type { Category } from 'helpers/types'
-
-type Input = void
-
-type Result = Array
-
-const cmd: Command = createCommand('listCategories', () =>
- fromPromise(listCategories()),
-)
-
-export default cmd
diff --git a/src/commands/uninstallApp.js b/src/commands/uninstallApp.js
index 684712c3..6d713a4c 100644
--- a/src/commands/uninstallApp.js
+++ b/src/commands/uninstallApp.js
@@ -4,7 +4,7 @@ import { createCommand, Command } from 'helpers/ipc'
import { withDevice } from '@ledgerhq/live-common/lib/hw/deviceAccess'
import uninstallApp from '@ledgerhq/live-common/lib/hw/uninstallApp'
-import type { ApplicationVersion } from 'helpers/types'
+import type { ApplicationVersion } from '@ledgerhq/live-common/lib/types/manager'
type Input = {
app: ApplicationVersion,
diff --git a/src/components/GenuineCheck.js b/src/components/GenuineCheck.js
index 76a53ba7..09107831 100644
--- a/src/components/GenuineCheck.js
+++ b/src/components/GenuineCheck.js
@@ -9,7 +9,8 @@ import { delay, createCancelablePolling } from 'helpers/promise'
import logger from 'logger'
import type { T, Device } from 'types/common'
-import type { DeviceInfo } from 'helpers/types'
+import manager from '@ledgerhq/live-common/lib/manager'
+import type { DeviceInfo } from '@ledgerhq/live-common/lib/types/manager'
import { GENUINE_TIMEOUT, DEVICE_INFOS_TIMEOUT, GENUINE_CACHE_DELAY } from 'config/constants'
@@ -92,6 +93,16 @@ class GenuineCheck extends PureComponent {
return true
}
+ // Preload things in parallel
+ Promise.all([
+ // Step dashboard, we preload the applist before entering manager while we're still doing the genuine check
+ manager.getAppsList(deviceInfo),
+ // we also preload as much info as possible in case of a MCU
+ manager.getLatestFirmwareForDevice(deviceInfo),
+ ]).catch(e => {
+ logger.warn(e)
+ })
+
if (genuineDevices.has(device)) {
logger.log("genuine was already checked. don't check again")
await delay(GENUINE_CACHE_DELAY)
diff --git a/src/components/ManagerPage/AppSearchBar.js b/src/components/ManagerPage/AppSearchBar.js
index 7e055e08..378bc423 100644
--- a/src/components/ManagerPage/AppSearchBar.js
+++ b/src/components/ManagerPage/AppSearchBar.js
@@ -3,7 +3,7 @@
import React, { PureComponent, Fragment } from 'react'
import styled from 'styled-components'
-import type { ApplicationVersion } from 'helpers/types'
+import type { ApplicationVersion } from '@ledgerhq/live-common/lib/types/manager'
import Box from 'components/base/Box'
import Space from 'components/base/Space'
diff --git a/src/components/ManagerPage/AppsList.js b/src/components/ManagerPage/AppsList.js
index a155af7c..97f9cea2 100644
--- a/src/components/ManagerPage/AppsList.js
+++ b/src/components/ManagerPage/AppsList.js
@@ -9,11 +9,10 @@ import { compose } from 'redux'
import { throttleTime, filter, map } from 'rxjs/operators'
import type { Device, T } from 'types/common'
-import type { ApplicationVersion, DeviceInfo } from 'helpers/types'
+import type { ApplicationVersion, DeviceInfo } from '@ledgerhq/live-common/lib/types/manager'
+import manager from '@ledgerhq/live-common/lib/manager'
import { getFullListSortedCryptoCurrencies } from 'helpers/countervalues'
import { developerModeSelector } from 'reducers/settings'
-import listApps from 'commands/listApps'
-import listAppVersions from 'commands/listAppVersions'
import installApp from 'commands/installApp'
import uninstallApp from 'commands/uninstallApp'
import Box from 'components/base/Box'
@@ -131,24 +130,14 @@ class AppsList extends PureComponent {
}
async fetchAppList() {
- try {
- const { deviceInfo } = this.props
-
- const [
- applicationsList,
- compatibleAppVersionsList,
- sortedCryptoCurrencies,
- ] = await Promise.all([
- listApps.send().toPromise(),
- listAppVersions.send(deviceInfo).toPromise(),
- getFullListSortedCryptoCurrencies(),
- ])
+ const { deviceInfo, isDevMode } = this.props
- const filteredAppVersionsList = this.prepareAppList({
- applicationsList,
- compatibleAppVersionsList,
- sortedCryptoCurrencies,
- })
+ try {
+ const filteredAppVersionsList = await manager.getAppsList(
+ deviceInfo,
+ isDevMode,
+ getFullListSortedCryptoCurrencies,
+ )
if (!this._unmounted) {
this.setState({
diff --git a/src/components/ManagerPage/Dashboard.js b/src/components/ManagerPage/Dashboard.js
index 3e6d3687..b26e3b09 100644
--- a/src/components/ManagerPage/Dashboard.js
+++ b/src/components/ManagerPage/Dashboard.js
@@ -4,7 +4,7 @@ import { translate } from 'react-i18next'
import styled from 'styled-components'
import type { T, Device } from 'types/common'
-import type { DeviceInfo } from 'helpers/types'
+import type { DeviceInfo } from '@ledgerhq/live-common/lib/types/manager'
import Box from 'components/base/Box'
import Text from 'components/base/Text'
diff --git a/src/components/ManagerPage/index.js b/src/components/ManagerPage/index.js
index 24ee0407..59fb7c65 100644
--- a/src/components/ManagerPage/index.js
+++ b/src/components/ManagerPage/index.js
@@ -5,7 +5,7 @@ import invariant from 'invariant'
import { openURL } from 'helpers/linking'
import { urls } from 'config/urls'
import type { Device } from 'types/common'
-import type { DeviceInfo } from 'helpers/types'
+import type { DeviceInfo } from '@ledgerhq/live-common/lib/types/manager'
import { getFullListSortedCryptoCurrencies } from 'helpers/countervalues'
import Dashboard from './Dashboard'
diff --git a/src/config/constants.js b/src/config/constants.js
index ac43b517..76f8af9c 100644
--- a/src/config/constants.js
+++ b/src/config/constants.js
@@ -58,12 +58,6 @@ export const LEDGER_REST_API_BASE = stringFromEnv(
'LEDGER_REST_API_BASE',
'https://explorers.api.live.ledger.com',
)
-export const MANAGER_API_BASE = stringFromEnv(
- 'MANAGER_API_BASE',
- 'https://manager.api.live.ledger.com/api',
-)
-
-export const BASE_SOCKET_URL = stringFromEnv('BASE_SOCKET_URL', 'wss://api.ledgerwallet.com/update')
// Provider
export const FORCE_PROVIDER = intFromEnv('FORCE_PROVIDER', 0)
diff --git a/src/helpers/apps/installApp.js b/src/helpers/apps/installApp.js
deleted file mode 100644
index 1c854062..00000000
--- a/src/helpers/apps/installApp.js
+++ /dev/null
@@ -1,52 +0,0 @@
-// @flow
-import type Transport from '@ledgerhq/hw-transport'
-
-import { createDeviceSocket } from 'helpers/socket'
-
-import type { ApplicationVersion } from 'helpers/types'
-import { WS_INSTALL } from 'helpers/urls'
-
-import {
- ManagerNotEnoughSpaceError,
- ManagerDeviceLockedError,
- ManagerAppAlreadyInstalledError,
- ManagerAppRelyOnBTCError,
-} from '@ledgerhq/live-common/lib/errors'
-
-function remapError(promise) {
- return promise.catch((e: Error) => {
- switch (true) {
- case e.message.endsWith('6982'):
- throw new ManagerDeviceLockedError()
- case e.message.endsWith('6a84') || e.message.endsWith('6a85'):
- throw new ManagerNotEnoughSpaceError()
- case e.message.endsWith('6a80') || e.message.endsWith('6a81'):
- throw new ManagerAppAlreadyInstalledError()
- case e.message.endsWith('6a83'):
- throw new ManagerAppRelyOnBTCError()
- default:
- throw e
- }
- })
-}
-
-/**
- * Install an app on the device
- */
-export default async function installApp(
- transport: Transport<*>,
- targetId: string | number,
- { app }: { app: ApplicationVersion },
-): Promise {
- const params = {
- targetId,
- perso: app.perso,
- deleteKey: app.delete_key,
- firmware: app.firmware,
- firmwareKey: app.firmware_key,
- hash: app.hash,
- }
-
- const url = WS_INSTALL(params)
- await remapError(createDeviceSocket(transport, url).toPromise())
-}
diff --git a/src/helpers/apps/listAppVersions.js b/src/helpers/apps/listAppVersions.js
deleted file mode 100644
index bc48fc6a..00000000
--- a/src/helpers/apps/listAppVersions.js
+++ /dev/null
@@ -1,30 +0,0 @@
-// @flow
-import network from 'api/network'
-import type { DeviceInfo, DeviceVersion, FinalFirmware, ApplicationVersion } from 'helpers/types'
-
-import { APPLICATIONS_BY_DEVICE } from 'helpers/urls'
-import getDeviceVersion from 'helpers/devices/getDeviceVersion'
-import getCurrentFirmware from 'helpers/devices/getCurrentFirmware'
-
-type NetworkResponse = { data: { application_versions: Array } }
-
-export default async (deviceInfo: DeviceInfo): Promise> => {
- const deviceData: DeviceVersion = await getDeviceVersion(
- deviceInfo.targetId,
- deviceInfo.providerId,
- )
- const firmwareData: FinalFirmware = await getCurrentFirmware({
- deviceId: deviceData.id,
- fullVersion: deviceInfo.fullVersion,
- provider: deviceInfo.providerId,
- })
- const params = {
- provider: deviceInfo.providerId,
- current_se_firmware_final_version: firmwareData.id,
- device_version: deviceData.id,
- }
- const {
- data: { application_versions },
- }: NetworkResponse = await network({ method: 'POST', url: APPLICATIONS_BY_DEVICE, data: params })
- return application_versions.length > 0 ? application_versions : []
-}
diff --git a/src/helpers/apps/listApps.js b/src/helpers/apps/listApps.js
deleted file mode 100644
index 14fed369..00000000
--- a/src/helpers/apps/listApps.js
+++ /dev/null
@@ -1,10 +0,0 @@
-// @flow
-import network from 'api/network'
-
-import { GET_APPLICATIONS } from 'helpers/urls'
-import type { Application } from 'helpers/types'
-
-export default async (): Promise> => {
- const { data } = await network({ method: 'GET', url: GET_APPLICATIONS })
- return data.length > 0 ? data : []
-}
diff --git a/src/helpers/apps/listCategories.js b/src/helpers/apps/listCategories.js
deleted file mode 100644
index 1c903b0a..00000000
--- a/src/helpers/apps/listCategories.js
+++ /dev/null
@@ -1,10 +0,0 @@
-// @flow
-import network from 'api/network'
-
-import { GET_CATEGORIES } from 'helpers/urls'
-import type { Category } from 'helpers/types'
-
-export default async (): Promise> => {
- const { data }: { data: Array } = await network({ method: 'GET', url: GET_CATEGORIES })
- return data.length > 0 ? data : []
-}
diff --git a/src/helpers/apps/uninstallApp.js b/src/helpers/apps/uninstallApp.js
deleted file mode 100644
index 161c0ae8..00000000
--- a/src/helpers/apps/uninstallApp.js
+++ /dev/null
@@ -1,41 +0,0 @@
-// @flow
-import type Transport from '@ledgerhq/hw-transport'
-
-import { createDeviceSocket } from 'helpers/socket'
-
-import type { ApplicationVersion } from 'helpers/types'
-import { ManagerDeviceLockedError, ManagerUninstallBTCDep } from '@ledgerhq/live-common/lib/errors'
-import { WS_INSTALL } from 'helpers/urls'
-
-function remapError(promise) {
- return promise.catch((e: Error) => {
- switch (true) {
- case e.message.endsWith('6982'):
- throw new ManagerDeviceLockedError()
- case e.message.endsWith('6a83'):
- throw new ManagerUninstallBTCDep()
- default:
- throw e
- }
- })
-}
-
-/**
- * Install an app on the device
- */
-export default async function uninstallApp(
- transport: Transport<*>,
- targetId: string | number,
- { app }: { app: ApplicationVersion },
-): Promise {
- const params = {
- targetId,
- perso: app.perso,
- deleteKey: app.delete_key,
- firmware: app.delete,
- firmwareKey: app.delete_key,
- hash: app.hash,
- }
- const url = WS_INSTALL(params)
- await remapError(createDeviceSocket(transport, url).toPromise())
-}
diff --git a/src/helpers/debugAppInfosForCurrency/btc.js b/src/helpers/debugAppInfosForCurrency/btc.js
deleted file mode 100644
index 74e7460a..00000000
--- a/src/helpers/debugAppInfosForCurrency/btc.js
+++ /dev/null
@@ -1,9 +0,0 @@
-// @flow
-
-import type Transport from '@ledgerhq/hw-transport'
-
-export default async (transport: Transport<*>) => {
- const r = await transport.send(0xe0, 0xc4, 0, 0)
- const version = `${r[2]}.${r[3]}.${r[4]}`
- return { version }
-}
diff --git a/src/helpers/debugAppInfosForCurrency/ethereum.js b/src/helpers/debugAppInfosForCurrency/ethereum.js
deleted file mode 100644
index ce090c76..00000000
--- a/src/helpers/debugAppInfosForCurrency/ethereum.js
+++ /dev/null
@@ -1,10 +0,0 @@
-// @flow
-
-import Eth from '@ledgerhq/hw-app-eth'
-import type Transport from '@ledgerhq/hw-transport'
-
-export default async (transport: Transport<*>) => {
- const eth = new Eth(transport)
- const { version } = await eth.getAppConfiguration()
- return { version }
-}
diff --git a/src/helpers/debugAppInfosForCurrency/index.js b/src/helpers/debugAppInfosForCurrency/index.js
deleted file mode 100644
index 95aeead3..00000000
--- a/src/helpers/debugAppInfosForCurrency/index.js
+++ /dev/null
@@ -1,29 +0,0 @@
-// @flow
-
-import type { CryptoCurrency } from '@ledgerhq/live-common/lib/types'
-import invariant from 'invariant'
-import type Transport from '@ledgerhq/hw-transport'
-import bitcoin from './btc'
-import ethereum from './ethereum'
-import ripple from './ripple'
-
-type Resolver = (
- transport: Transport<*>,
- currency: CryptoCurrency,
-) => Promise<{
- version?: string,
-}>
-
-const perFamily: { [_: string]: * } = {
- bitcoin,
- ethereum,
- ripple,
-}
-
-const proxy: Resolver = (transport, currency) => {
- const getAddress = perFamily[currency.family]
- invariant(getAddress, `getAddress not implemented for ${currency.id}`)
- return getAddress(transport)
-}
-
-export default proxy
diff --git a/src/helpers/debugAppInfosForCurrency/ripple.js b/src/helpers/debugAppInfosForCurrency/ripple.js
deleted file mode 100644
index dcabc884..00000000
--- a/src/helpers/debugAppInfosForCurrency/ripple.js
+++ /dev/null
@@ -1,10 +0,0 @@
-// @flow
-
-import Xrp from '@ledgerhq/hw-app-xrp'
-import type Transport from '@ledgerhq/hw-transport'
-
-export default async (transport: Transport<*>) => {
- const xrp = new Xrp(transport)
- const { version } = await xrp.getAppConfiguration()
- return { version }
-}
diff --git a/src/helpers/devices/getBitcoinLikeInfo.js b/src/helpers/devices/getBitcoinLikeInfo.js
deleted file mode 100644
index 82e8ed75..00000000
--- a/src/helpers/devices/getBitcoinLikeInfo.js
+++ /dev/null
@@ -1,21 +0,0 @@
-// @flow
-
-import type Transport from '@ledgerhq/hw-transport'
-
-const getBitcoinLikeInfo = (
- transport: Transport,
-): Promise<{
- P2PKH: number,
- P2SH: number,
- message: Buffer,
- short: Buffer,
-}> =>
- transport.send(0xe0, 0x16, 0x00, 0x00).then(res => {
- const P2PKH = res.readUInt16BE(0)
- const P2SH = res.readUInt16BE(2)
- const message = res.slice(5, res.readUInt8(4))
- const short = res.slice(5 + message.length + 1, res.readUInt8(5 + message.length))
- return { P2PKH, P2SH, message, short }
- })
-
-export default getBitcoinLikeInfo
diff --git a/src/helpers/devices/getCurrentFirmware.js b/src/helpers/devices/getCurrentFirmware.js
deleted file mode 100644
index c4ef5979..00000000
--- a/src/helpers/devices/getCurrentFirmware.js
+++ /dev/null
@@ -1,24 +0,0 @@
-// @flow
-import network from 'api/network'
-
-import { GET_CURRENT_FIRMWARE } from 'helpers/urls'
-import type { FinalFirmware } from 'helpers/types'
-
-type Input = {
- fullVersion: string,
- deviceId: string | number,
- provider: number,
-}
-
-export default async (input: Input): Promise => {
- const { data }: { data: FinalFirmware } = await network({
- method: 'POST',
- url: GET_CURRENT_FIRMWARE,
- data: {
- device_version: input.deviceId,
- version_name: input.fullVersion,
- provider: input.provider,
- },
- })
- return data
-}
diff --git a/src/helpers/devices/getDeviceInfo.js b/src/helpers/devices/getDeviceInfo.js
deleted file mode 100644
index 1bfef909..00000000
--- a/src/helpers/devices/getDeviceInfo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-// @flow
-
-import getDeviceInfo from '@ledgerhq/live-common/lib/hw/getDeviceInfo'
-
-export default getDeviceInfo
diff --git a/src/helpers/devices/getDeviceVersion.js b/src/helpers/devices/getDeviceVersion.js
deleted file mode 100644
index c681cfa9..00000000
--- a/src/helpers/devices/getDeviceVersion.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// @flow
-import { GET_DEVICE_VERSION } from 'helpers/urls'
-import network from 'api/network'
-
-import type { DeviceVersion } from 'helpers/types'
-
-export default async (targetId: string | number, provider: number): Promise => {
- const { data }: { data: DeviceVersion } = await network({
- method: 'POST',
- url: GET_DEVICE_VERSION,
- data: {
- provider,
- target_id: targetId,
- },
- })
- return data
-}
diff --git a/src/helpers/devices/getIsGenuine.js b/src/helpers/devices/getIsGenuine.js
deleted file mode 100644
index 3357042b..00000000
--- a/src/helpers/devices/getIsGenuine.js
+++ /dev/null
@@ -1,32 +0,0 @@
-// @flow
-import type Transport from '@ledgerhq/hw-transport'
-import { SKIP_GENUINE } from 'config/constants'
-import { WS_GENUINE } from 'helpers/urls'
-import type { DeviceInfo, FinalFirmware, DeviceVersion } from 'helpers/types'
-
-import { createDeviceSocket } from 'helpers/socket'
-import getCurrentFirmware from './getCurrentFirmware'
-import getDeviceVersion from './getDeviceVersion'
-
-export default async (transport: Transport<*>, deviceInfo: DeviceInfo): Promise => {
- const deviceVersion: DeviceVersion = await getDeviceVersion(
- deviceInfo.targetId,
- deviceInfo.providerId,
- )
-
- const firmware: FinalFirmware = await getCurrentFirmware({
- deviceId: deviceVersion.id,
- fullVersion: deviceInfo.fullVersion,
- provider: deviceInfo.providerId,
- })
-
- const params = {
- targetId: deviceInfo.targetId,
- perso: firmware.perso,
- }
-
- const url = WS_GENUINE(params)
- return SKIP_GENUINE
- ? new Promise(resolve => setTimeout(() => resolve('0000'), 1000))
- : createDeviceSocket(transport, url).toPromise()
-}
diff --git a/src/helpers/devices/getMemInfo.js b/src/helpers/devices/getMemInfo.js
deleted file mode 100644
index 04c5a833..00000000
--- a/src/helpers/devices/getMemInfo.js
+++ /dev/null
@@ -1,10 +0,0 @@
-// @flow
-
-import type Transport from '@ledgerhq/hw-transport'
-
-import getFirmwareInfo from 'helpers/firmware/getFirmwareInfo'
-
-export default async function getMemInfos(transport: Transport<*>): Promise