Skip to content

Commit

Permalink
fix(BCH): correctly select imported address bch balances
Browse files Browse the repository at this point in the history
  • Loading branch information
Thore3 committed Aug 17, 2018
1 parent 6d96513 commit 80b958b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const getContext = createDeepEqualSelector(
export const getSpendableContext = createDeepEqualSelector(
[
walletSelectors.getHDAccounts,
walletSelectors.getSpendableContext,
walletSelectors.getSpendableAddrContext,
getAccounts
],
(btcHDAccounts, spendableAddresses, metadataAccountsR) => {
Expand All @@ -71,8 +71,7 @@ export const getSpendableContext = createDeepEqualSelector(
return map(prop('xpub'), activeAccounts)
}
const activeAccounts = metadataAccountsR.map(transform).getOrElse([])
const addresses = keysIn(spendableAddresses)
return concat(activeAccounts, addresses)
return concat(activeAccounts, spendableAddresses)
}
)

Expand Down
5 changes: 5 additions & 0 deletions packages/blockchain-wallet-v4/src/redux/wallet/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ export const getSpendableContext = compose(
Wallet.selectSpendableContext,
getWallet
)
export const getSpendableAddrContext = compose(
ImtoJS,
Wallet.selectSpendableAddrContext,
getWallet
)
export const getUnspendableContext = compose(
ImtoJS,
Wallet.selectUnspendableContext,
Expand Down

0 comments on commit 80b958b

Please sign in to comment.