Browse Source

Merge branch 'master' into listenDevices-command

master
Gaëtan Renaudeau 7 years ago
committed by GitHub
parent
commit
ff5dad2d42
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      package.json
  2. 6
      src/helpers/getAddressForCurrency/ethereum.js
  3. 8
      yarn.lock

1
package.json

@ -53,6 +53,7 @@
"d3": "^5.1.0",
"debug": "^3.1.0",
"downshift": "^1.31.9",
"eip55": "^1.0.3",
"electron-store": "^1.3.0",
"electron-updater": "^2.21.8",
"ethereumjs-tx": "^1.3.4",

6
src/helpers/getAddressForCurrency/ethereum.js

@ -2,6 +2,7 @@
import Eth from '@ledgerhq/hw-app-eth'
import type Transport from '@ledgerhq/hw-transport'
import eip55 from 'eip55'
export default async (
transport: Transport<*>,
@ -10,6 +11,7 @@ export default async (
{ verify = false }: { verify: boolean },
) => {
const eth = new Eth(transport)
const { address, publicKey } = await eth.getAddress(path, verify)
return { path, address, publicKey }
const r = await eth.getAddress(path, verify)
const address = eip55.encode(r.address)
return { path, address, publicKey: r.publicKey }
}

8
yarn.lock

@ -5493,6 +5493,12 @@ ee-first@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
eip55@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/eip55/-/eip55-1.0.3.tgz#a927e6850aed8d8a34ed496d629bb3a7bfb037f2"
dependencies:
keccak "^1.3.0"
ejs@^2.5.7, ejs@^2.5.9, ejs@^2.6.1:
version "2.6.1"
resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.6.1.tgz#498ec0d495655abc6f23cd61868d926464071aa0"
@ -8587,7 +8593,7 @@ jsx-ast-utils@^2.0.0, jsx-ast-utils@^2.0.1:
dependencies:
array-includes "^3.0.3"
keccak@^1.0.2:
keccak@^1.0.2, keccak@^1.3.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/keccak/-/keccak-1.4.0.tgz#572f8a6dbee8e7b3aa421550f9e6408ca2186f80"
dependencies:

Loading…
Cancel
Save