From 9d5bbab53bee41595bcc27020bd7643a07b63316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Fri, 25 May 2018 16:17:44 +0200 Subject: [PATCH] Libcore will now suggest new account to create for now we do both for segwit & non segwit because some coin don't even have segwit --- package.json | 2 +- src/helpers/getAddressForCurrency/btc.js | 4 +- src/helpers/getAddressForCurrency/index.js | 5 + .../accounts/scanAccountsOnDevice.js | 18 +- yarn.lock | 906 ++++++++++-------- 5 files changed, 529 insertions(+), 406 deletions(-) diff --git a/package.json b/package.json index 78bbbc74..f6c8464f 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "@ledgerhq/hw-app-xrp": "^4.12.0", "@ledgerhq/hw-transport": "^4.12.0", "@ledgerhq/hw-transport-node-hid": "^4.12.0", - "@ledgerhq/ledger-core": "^1.2.0", + "@ledgerhq/ledger-core": "^1.2.1", "@ledgerhq/live-common": "^2.9.1", "axios": "^0.18.0", "babel-runtime": "^6.26.0", diff --git a/src/helpers/getAddressForCurrency/btc.js b/src/helpers/getAddressForCurrency/btc.js index 401b4768..e623dfa2 100644 --- a/src/helpers/getAddressForCurrency/btc.js +++ b/src/helpers/getAddressForCurrency/btc.js @@ -11,8 +11,8 @@ export default async ( segwit = true, verify = false, }: { - segwit: boolean, - verify: boolean, + segwit?: boolean, + verify?: boolean, }, ) => { const btc = new Btc(transport) diff --git a/src/helpers/getAddressForCurrency/index.js b/src/helpers/getAddressForCurrency/index.js index 3a859b48..eb15d6f6 100644 --- a/src/helpers/getAddressForCurrency/index.js +++ b/src/helpers/getAddressForCurrency/index.js @@ -21,6 +21,11 @@ const all = { bitcoin: btc, bitcoin_testnet: btc, + zcash: btc, + bitcoin_cash: btc, + bitcoin_gold: btc, + zencash: btc, + ethereum, ethereum_testnet: ethereum, ethereum_classic: ethereum, diff --git a/src/internals/accounts/scanAccountsOnDevice.js b/src/internals/accounts/scanAccountsOnDevice.js index 10f8f2bb..109c623a 100644 --- a/src/internals/accounts/scanAccountsOnDevice.js +++ b/src/internals/accounts/scanAccountsOnDevice.js @@ -35,13 +35,13 @@ export default function scanAccountsOnDevice(props: Props): Promise