Skip to content

Commit

Permalink
fix sendsheet wallet balance (#2261)
Browse files Browse the repository at this point in the history
  • Loading branch information
brunobar79 committed Aug 4, 2021
1 parent 43153a0 commit 1db9e4f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/hooks/useUserAccounts.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { values } from 'lodash';

import useAccountSettings from './useAccountSettings';
import useWallets from './useWallets';
import useWalletsWithBalancesAndNames from './useWalletsWithBalancesAndNames';
import walletTypes from '@rainbow-me/helpers/walletTypes';

export default function useUserAccounts() {
const { wallets } = useWallets();
const walletsWithBalancesAndNames = useWalletsWithBalancesAndNames();
const { network } = useAccountSettings();

const userAccounts = useMemo(() => {
const filteredWallets = values(wallets).filter(
const filteredWallets = values(walletsWithBalancesAndNames).filter(
wallet => wallet.type !== walletTypes.readOnly
);
const addresses = [];
Expand All @@ -22,7 +22,7 @@ export default function useUserAccounts() {
});
});
return addresses;
}, [network, wallets]);
}, [network, walletsWithBalancesAndNames]);

return {
userAccounts,
Expand Down

0 comments on commit 1db9e4f

Please sign in to comment.