UNPKG

@moonwell-fi/moonwell-sdk

Version:

TypeScript Interface for Moonwell

25 lines 930 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getSnapshotProposal = getSnapshotProposal; const lodash_1 = __importDefault(require("lodash")); const { first } = lodash_1.default; const index_js_1 = require("../../../common/index.js"); const common_js_1 = require("./common.js"); async function getSnapshotProposal(client, args) { const { proposalId } = args; const environment = (0, index_js_1.getEnvironmentFromArgs)(client, args); if (!environment) { return undefined; } const result = await (0, common_js_1.getSnapshotProposalData)({ environments: [environment], filters: { id: proposalId, }, }); return first(result.proposals); } //# sourceMappingURL=getSnapshotProposal.js.map