"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useSelectableCurrencies = void 0;
const react_1 = require("react");
const cryptoassets_1 = require("@ledgerhq/cryptoassets");
const useSelectableCurrencies = ({ allCurrencies, }) => {
    const currencies = (0, react_1.useMemo)(() => {
        const tokens = allCurrencies.map(cryptoassets_1.findTokenById).filter(Boolean);
        const cryptoCurrencies = allCurrencies.map(cryptoassets_1.findCryptoCurrencyById).filter(Boolean);
        return [...tokens, ...cryptoCurrencies];
    }, [allCurrencies]);
    return currencies;
};
exports.useSelectableCurrencies = useSelectableCurrencies;
//# sourceMappingURL=useSelectableCurrencies.js.map