@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
11 lines • 511 B
JavaScript
import { getAccountTuplesForCurrency } from "../../utils/getAccountTuplesForCurrency";
export const useNetworkAccountCounts = ({ networks, nestedAccounts, formatLabel, }) => networks.map(network => {
const asset = network.type === "TokenCurrency" ? network.parentCurrency : network;
const { length } = getAccountTuplesForCurrency(asset, nestedAccounts);
return {
asset,
label: formatLabel(length),
count: length,
};
});
//# sourceMappingURL=useNetworkAccountCounts.js.map