Gaëtan Renaudeau
7 years ago
committed by
GitHub
17 changed files with 104 additions and 44 deletions
@ -1,7 +1,6 @@ |
|||||
// @flow
|
// @flow
|
||||
import type { Currency } from '@ledgerhq/live-common/lib/types' |
import type { Currency } from '@ledgerhq/live-common/lib/types' |
||||
|
import { LEDGER_REST_API_BASE } from 'config/constants' |
||||
const BASE_URL = process.env.LEDGER_REST_API_BASE || 'https://api.ledgerwallet.com/' |
|
||||
|
|
||||
export const blockchainBaseURL = ({ ledgerExplorerId }: Currency): ?string => |
export const blockchainBaseURL = ({ ledgerExplorerId }: Currency): ?string => |
||||
ledgerExplorerId ? `${BASE_URL}blockchain/v2/${ledgerExplorerId}` : null |
ledgerExplorerId ? `${LEDGER_REST_API_BASE}blockchain/v2/${ledgerExplorerId}` : null |
||||
|
@ -1,6 +1,7 @@ |
|||||
// @flow
|
// @flow
|
||||
|
import { LEDGER_DEBUG_ALL_LANGS } from 'config/constants' |
||||
|
|
||||
const allLanguages = ['en', 'fr'] |
const allLanguages = ['en', 'fr'] |
||||
const prodStableLanguages = ['en'] |
const prodStableLanguages = ['en'] |
||||
const languages = process.env.LEDGER_DEBUG_ALL_LANGS ? allLanguages : prodStableLanguages |
const languages = LEDGER_DEBUG_ALL_LANGS ? allLanguages : prodStableLanguages |
||||
export default languages |
export default languages |
||||
|
@ -1,13 +0,0 @@ |
|||||
// Socket endpoint
|
|
||||
|
|
||||
export const BASE_SOCKET_URL = 'ws://api.ledgerwallet.com/update' |
|
||||
export const MANAGER_API_URL = 'wss://api.ledgerwallet.com/update' |
|
||||
export const API_BASE_URL = process.env.API_BASE_URL || 'https://beta.manager.live.ledger.fr/api' |
|
||||
|
|
||||
// List of APDUS
|
|
||||
export const APDUS = { |
|
||||
GET_FIRMWARE: [0xe0, 0x01, 0x00, 0x00], |
|
||||
// we dont have common call that works inside app & dashboard
|
|
||||
// TODO: this should disappear.
|
|
||||
GET_FIRMWARE_FALLBACK: [0xe0, 0xc4, 0x00, 0x00], |
|
||||
} |
|
@ -1,11 +1,12 @@ |
|||||
// @flow
|
// @flow
|
||||
import type Transport from '@ledgerhq/hw-transport' |
import type Transport from '@ledgerhq/hw-transport' |
||||
import { createSocketDialog } from 'helpers/common' |
import { createSocketDialog } from 'helpers/common' |
||||
|
import { SKIP_GENUINE } from 'config/constants' |
||||
|
|
||||
export default async ( |
export default async ( |
||||
transport: Transport<*>, |
transport: Transport<*>, |
||||
{ targetId }: { targetId: string | number }, |
{ targetId }: { targetId: string | number }, |
||||
): Promise<string> => |
): Promise<string> => |
||||
process.env.SKIP_GENUINE > 0 |
SKIP_GENUINE |
||||
? new Promise(resolve => setTimeout(() => resolve('0000'), 1000)) |
? new Promise(resolve => setTimeout(() => resolve('0000'), 1000)) |
||||
: createSocketDialog(transport, '/genuine', { targetId }, true) |
: createSocketDialog(transport, '/genuine', { targetId }, true) |
||||
|
Loading…
Reference in new issue