Browse Source
Merge pull request #387 from gre/latest-lib-common
Remove Account#path with latest live-common
master
Gaëtan Renaudeau
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
6 additions and
13 deletions
-
package.json
-
src/bridge/EthereumJSBridge.js
-
src/bridge/RippleJSBridge.js
-
yarn.lock
|
|
@ -42,7 +42,7 @@ |
|
|
|
"@ledgerhq/hw-transport": "^4.12.0", |
|
|
|
"@ledgerhq/hw-transport-node-hid": "^4.12.0", |
|
|
|
"@ledgerhq/ledger-core": "^1.2.1", |
|
|
|
"@ledgerhq/live-common": "^2.9.1", |
|
|
|
"@ledgerhq/live-common": "2.10.0", |
|
|
|
"axios": "^0.18.0", |
|
|
|
"babel-runtime": "^6.26.0", |
|
|
|
"bcryptjs": "^2.4.3", |
|
|
|
|
|
@ -115,7 +115,6 @@ const EthereumBridge: WalletBridge<Transaction> = { |
|
|
|
let { txs } = await api.getTransactions(address) |
|
|
|
if (finished) return { complete: true } |
|
|
|
|
|
|
|
const path = freshAddressPath // FIXME
|
|
|
|
const freshAddress = address |
|
|
|
|
|
|
|
if (txs.length === 0) { |
|
|
@ -127,7 +126,6 @@ const EthereumBridge: WalletBridge<Transaction> = { |
|
|
|
const account: $Exact<Account> = { |
|
|
|
id: accountId, |
|
|
|
xpub: '', |
|
|
|
path, // FIXME we probably not want the address path in the account.path
|
|
|
|
freshAddress, |
|
|
|
freshAddressPath, |
|
|
|
name: 'New Account', |
|
|
@ -153,7 +151,6 @@ const EthereumBridge: WalletBridge<Transaction> = { |
|
|
|
const account: $Exact<Account> = { |
|
|
|
id: accountId, |
|
|
|
xpub: '', |
|
|
|
path, // FIXME we probably not want the address path in the account.path
|
|
|
|
freshAddress, |
|
|
|
freshAddressPath, |
|
|
|
name: address.slice(32), |
|
|
@ -308,7 +305,7 @@ const EthereumBridge: WalletBridge<Transaction> = { |
|
|
|
.send({ |
|
|
|
currencyId: a.currency.id, |
|
|
|
devicePath: deviceId, |
|
|
|
path: a.path, |
|
|
|
path: a.freshAddressPath, |
|
|
|
transaction: { ...t, nonce }, |
|
|
|
}) |
|
|
|
.toPromise() |
|
|
|
|
|
@ -188,8 +188,6 @@ const RippleJSBridge: WalletBridge<Transaction> = { |
|
|
|
for (const derivation of derivations) { |
|
|
|
for (let index = 0; index < 255; index++) { |
|
|
|
const freshAddressPath = derivation({ currency, x: index, segwit: false }) |
|
|
|
const path = freshAddressPath |
|
|
|
// FIXME^ we need the account path, not the address path
|
|
|
|
const { address } = await await getAddress |
|
|
|
.send({ currencyId: currency.id, devicePath: deviceId, path: freshAddressPath }) |
|
|
|
.toPromise() |
|
|
@ -215,7 +213,6 @@ const RippleJSBridge: WalletBridge<Transaction> = { |
|
|
|
next({ |
|
|
|
id: accountId, |
|
|
|
xpub: '', |
|
|
|
path, |
|
|
|
name: 'New Account', |
|
|
|
freshAddress, |
|
|
|
freshAddressPath, |
|
|
@ -247,7 +244,6 @@ const RippleJSBridge: WalletBridge<Transaction> = { |
|
|
|
const account: $Exact<Account> = { |
|
|
|
id: accountId, |
|
|
|
xpub: '', |
|
|
|
path, |
|
|
|
name: address.slice(0, 8), |
|
|
|
freshAddress, |
|
|
|
freshAddressPath, |
|
|
@ -426,7 +422,7 @@ const RippleJSBridge: WalletBridge<Transaction> = { |
|
|
|
.send({ |
|
|
|
currencyId: a.currency.id, |
|
|
|
devicePath: deviceId, |
|
|
|
path: a.path, |
|
|
|
path: a.freshAddressPath, |
|
|
|
transaction: JSON.parse(prepared.txJSON), |
|
|
|
}) |
|
|
|
.toPromise() |
|
|
|
|
|
@ -1464,9 +1464,9 @@ |
|
|
|
npm "^5.7.1" |
|
|
|
prebuild-install "^2.2.2" |
|
|
|
|
|
|
|
"@ledgerhq/live-common@^2.9.1": |
|
|
|
version "2.9.2" |
|
|
|
resolved "https://registry.yarnpkg.com/@ledgerhq/live-common/-/live-common-2.9.2.tgz#e77139368c690fc542cb95cdb87ea37890652377" |
|
|
|
"@ledgerhq/live-common@2.10.0": |
|
|
|
version "2.10.0" |
|
|
|
resolved "https://registry.yarnpkg.com/@ledgerhq/live-common/-/live-common-2.10.0.tgz#c4f8891e23f45afd533addf6f603edfeb284aa14" |
|
|
|
dependencies: |
|
|
|
axios "^0.18.0" |
|
|
|
invariant "^2.2.2" |
|
|
|