Browse Source

Store real xpub in account

master
meriadec 7 years ago
parent
commit
d6e79f9132
No known key found for this signature in database GPG Key ID: 1D2FC2305E2CB399
  1. 10
      src/helpers/libcore.js

10
src/helpers/libcore.js

@ -168,7 +168,6 @@ async function scanNextAccount(props: {
wallet, wallet,
currencyId, currencyId,
core, core,
hwApp,
ops, ops,
}) })
@ -217,7 +216,6 @@ async function buildAccountRaw({
wallet, wallet,
currencyId, currencyId,
core, core,
hwApp,
accountIndex, accountIndex,
ops, ops,
}: { }: {
@ -236,15 +234,11 @@ async function buildAccountRaw({
const balance = njsBalance.toLong() const balance = njsBalance.toLong()
const jsCurrency = getCryptoCurrencyById(currencyId) const jsCurrency = getCryptoCurrencyById(currencyId)
// retrieve xpub
const { derivations } = await wallet.getAccountCreationInfo(accountIndex) const { derivations } = await wallet.getAccountCreationInfo(accountIndex)
const [walletPath, accountPath] = derivations const [walletPath, accountPath] = derivations
const isVerify = false // retrieve xpub
const { bitcoinAddress } = await hwApp.getWalletPublicKey(accountPath, isVerify, isSegwit) const xpub = njsAccount.getRestoreKey()
const xpub = bitcoinAddress
// blockHeight // blockHeight
const { height: blockHeight } = await njsAccount.getLastBlock() const { height: blockHeight } = await njsAccount.getLastBlock()

Loading…
Cancel
Save