"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useCurrenciesByMarketcap = void 0;
const live_countervalues_react_1 = require("@ledgerhq/live-countervalues-react");
const sortByMarketcap_1 = require("./sortByMarketcap");
/**
 * Sorts the given currencies by marketcap.
 */
const useCurrenciesByMarketcap = (currencies) => {
    const ids = (0, live_countervalues_react_1.useMarketcapIds)();
    return ids ? (0, sortByMarketcap_1.sortCurrenciesByIds)(currencies, ids) : currencies;
};
exports.useCurrenciesByMarketcap = useCurrenciesByMarketcap;
//# sourceMappingURL=hooks.js.map