UNPKG

@moonwell-fi/moonwell-sdk

Version:

TypeScript Interface for Moonwell

13 lines 583 B
import { getEnvironmentsFromArgs } from "../../../common/index.js"; import { getUserPositionData } from "./common.js"; export async function getUserPositions(client, args) { const { userAddress } = args; const environments = getEnvironmentsFromArgs(client, args); const settled = await Promise.allSettled(environments.map((environment) => getUserPositionData({ environment, account: userAddress, }))); const result = settled.flatMap((s) => s.status === "fulfilled" ? s.value : []); return result; } //# sourceMappingURL=getUserPositions.js.map