UNPKG

@superfluid-finance/sdk-core

Version:
31 lines 1.4 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PoolDistributorQueryHandler = void 0; const subgraphQueryHandler_1 = require("../../subgraphQueryHandler"); const poolDistributors_generated_1 = require("./poolDistributors.generated"); class PoolDistributorQueryHandler extends subgraphQueryHandler_1.SubgraphQueryHandler { constructor() { super(...arguments); this.getAddressFieldKeysFromFilter = () => ({ accountKeys: ["account", "pool"], tokenKeys: [], }); this.getRelevantAddressesFromResultCore = (result) => ({ tokens: [result.token], accounts: [result.account, result.pool], }); this.mapFromSubgraphResponse = (response) => response.poolDistributors.map((x) => ({ ...x, createdAtTimestamp: Number(x.createdAtTimestamp), createdAtBlockNumber: Number(x.createdAtBlockNumber), updatedAtTimestamp: Number(x.updatedAtTimestamp), updatedAtBlockNumber: Number(x.updatedAtBlockNumber), pool: x.pool.id, token: x.pool.token.id, account: x.account.id, })); this.requestDocument = poolDistributors_generated_1.PoolDistributorsDocument; } } exports.PoolDistributorQueryHandler = PoolDistributorQueryHandler; //# sourceMappingURL=poolDistributor.js.map