"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const misc_1 = require("@ledgerhq/coin-stacks/bridge/utils/misc");
const api_1 = require("@ledgerhq/coin-stacks/network/api");
const flatMap_1 = __importDefault(require("lodash/flatMap"));
require("../../../__tests__/test-helpers/setup");
const account_1 = require("../../../account");
describe("sync for token transfers", () => {
    // Fetching txns for address with all types of transfers
    const address = "SP2BM6AQSMQ04CX8KDE62QBFVZTDZ2ZX80GZJSBZ4";
    const accountId = (0, account_1.encodeAccountId)({
        type: "js",
        version: "2",
        currencyId: "stacks",
        xpubOrAddress: "",
        derivationMode: "",
    });
    test("sync build operations only for transfer type txn", async () => {
        const rawTxs = await (0, api_1.fetchFullTxs)(address);
        // Contains operations for txn of type token_transfer
        const operations = (0, flatMap_1.default)(rawTxs, (0, misc_1.mapTxToOps)(accountId, address));
        expect(operations.length).toBeTruthy();
    });
});
//# sourceMappingURL=sync.integration.test.js.map