Browse Source

minor fix

master
Gaëtan Renaudeau 7 years ago
parent
commit
79e91df663
  1. 6
      src/internals/devices/ensureDeviceApp.js

6
src/internals/devices/ensureDeviceApp.js

@ -4,7 +4,7 @@ import invariant from 'invariant'
import CommNodeHid from '@ledgerhq/hw-transport-node-hid'
import type Transport from '@ledgerhq/hw-transport'
import type { IPCSend } from 'types/electron'
import getAdressFromCurrency from './getAddressForCurrency'
import getAddressForCurrency from './getAddressForCurrency'
export default async (
send: IPCSend,
@ -22,9 +22,9 @@ export default async (
},
) => {
try {
invariant(currencyId, 'currencyId is defined')
invariant(currencyId, 'currencyId "%s" not defined', currencyId)
const transport: Transport<*> = await CommNodeHid.open(devicePath)
const resolver = getAdressFromCurrency(currencyId)
const resolver = getAddressForCurrency(currencyId)
const address = await resolver(transport, currencyId, accountPath, options)
if (accountPath && accountAddress && address !== accountAddress) {
throw new Error('Account address is different than device address')

Loading…
Cancel
Save