"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const sortByMarketcap_1 = require("./sortByMarketcap");
const _1 = require(".");
const mock_1 = require("@ledgerhq/live-countervalues/mock");
const mock_2 = require("./mock");
test("sortCurrenciesByIds snapshot", () => {
    const list = [...(0, _1.listCryptoCurrencies)(), ...(0, _1.listTokens)()];
    const ids = [];
    for (const k in (0, mock_1.getBTCValues)()) {
        const c = (0, _1.findCurrencyByTicker)(k);
        if (c && (c.type == "CryptoCurrency" || c.type == "TokenCurrency")) {
            ids.push(c.id);
        }
    }
    expect((0, sortByMarketcap_1.sortCurrenciesByIds)(list, ids).map(c => c.id)[0]).toEqual("bitcoin");
});
test("sortCurrenciesByIds simulate staking from portfolio", () => {
    expect((0, sortByMarketcap_1.sortCurrenciesByIds)(mock_2.CURRENCIES_LIST, mock_2.IDS).map(c => c.id)).toEqual([
        "ethereum",
        "solana",
        "cardano",
        "polkadot",
        "cosmos",
        "near",
        "injective",
        "elrond",
        "tezos",
        "celo",
        "osmo",
        "axelar",
        "persistence",
        "onomy",
        "mantra",
        "crypto_org",
        "xion",
        "zenrock",
        "babylon",
        "quicksilver",
    ]);
});
//# sourceMappingURL=sortByMarketcap.test.js.map