diff --git a/src/config/constants.js b/src/config/constants.js index 516df479..03ff7b81 100644 --- a/src/config/constants.js +++ b/src/config/constants.js @@ -58,6 +58,9 @@ export const MANAGER_API_BASE = stringFromEnv( export const BASE_SOCKET_URL = stringFromEnv('BASE_SOCKET_URL', 'wss://api.ledgerwallet.com/update') +// Provider +export const FORCE_PROVIDER = intFromEnv('FORCE_PROVIDER', 0) + // Flags export const DEBUG_ANALYTICS = boolFromEnv('DEBUG_ANALYTICS') diff --git a/src/helpers/devices/getDeviceInfo.js b/src/helpers/devices/getDeviceInfo.js index f133b43e..5ea943e3 100644 --- a/src/helpers/devices/getDeviceInfo.js +++ b/src/helpers/devices/getDeviceInfo.js @@ -3,6 +3,7 @@ import type Transport from '@ledgerhq/hw-transport' import { getFirmwareInfo } from 'helpers/common' +import { FORCE_PROVIDER } from 'config/constants' export type DeviceInfo = { targetId: string | number, @@ -31,7 +32,7 @@ export default async (transport: Transport<*>): Promise => { seVersion.match(/([0-9]+.[0-9])+(.[0-9]+)?((?!-osu)-([a-z]+))?(-osu)?/) || [] const isOSU = typeof parsedVersion[5] !== 'undefined' const providerName = parsedVersion[4] || '' - const providerId = PROVIDERS[providerName] + const providerId = FORCE_PROVIDER || PROVIDERS[providerName] const isBootloader = targetId === 0x01000001 const majMin = parsedVersion[1] const patch = parsedVersion[2] || '.0'