@moonwell-fi/moonwell-sdk
Version:
TypeScript Interface for Moonwell
15 lines • 648 B
JavaScript
import { getEnvironmentsFromArgs } from "../../../common/index.js";
import { getUserMorphoRewardsData } from "./common.js";
export async function getMorphoUserRewards(client, args) {
const environments = getEnvironmentsFromArgs(client, args);
const environmentsUserRewards = await Promise.all(environments
.filter((environment) => environment.contracts.morphoViews !== undefined)
.map((environment) => {
return getUserMorphoRewardsData({
environment,
account: args.userAddress,
});
}));
return environmentsUserRewards.flat();
}
//# sourceMappingURL=getMorphoUserRewards.js.map