"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
require("./test-helpers/staticTime");
const live_env_1 = require("@ledgerhq/live-env");
const account_1 = require("../mock/account");
const currencies_1 = require("../currencies");
const csvExport_1 = require("../csvExport");
const logic_1 = require("@ledgerhq/live-countervalues/logic");
const currencies_2 = require("../currencies");
(0, currencies_2.setSupportedCurrencies)(["ethereum", "ripple"]);
(0, live_env_1.setEnv)("MOCK", "1");
(0, live_env_1.setEnv)("MOCK_COUNTERVALUES", "1");
test("export CSV", async () => {
    const fiatCurrency = (0, currencies_2.getFiatCurrencyByTicker)("USD");
    const currencies = ["bitcoin", "ethereum", "ripple"].map(currencies_1.getCryptoCurrencyById);
    const state = await (0, logic_1.loadCountervalues)(logic_1.initialState, {
        trackingPairs: currencies.map(currency => ({
            from: currency,
            to: fiatCurrency,
            startDate: new Date(Date.now() - 200 * 24 * 60 * 60 * 1000),
        })),
        autofillGaps: false,
        refreshRate: 60000,
        marketCapBatchingAfterRank: 20,
    });
    const accounts = currencies.map(currency => (0, account_1.genAccount)(`${currency.id}_export`, {
        currency,
    }));
    expect((0, csvExport_1.accountsOpToCSV)(accounts, fiatCurrency, state)).toMatchSnapshot();
});
//# sourceMappingURL=csvExport.js.map