Skip to content

Commit

Permalink
Merge branch 'preview'
Browse files Browse the repository at this point in the history
  • Loading branch information
phucledien committed Jun 5, 2024
2 parents a614235 + 4b2172f commit 40b24bc
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/commands/profile/index/processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ import config from "adapters/config"
import { formatVaults } from "commands/vault/list/processor"
import { getSlashCommand } from "utils/commands"
import { chunk } from "lodash"
import mochiPay from "adapters/mochi-pay"
import { composeInvestPortfolio } from "commands/invest/portfolio/processor"
import api from "../../../api"
import mochiApi from "../../../adapters/mochi-api"

Expand Down Expand Up @@ -130,15 +128,13 @@ async function compose(
socials,
walletsRes,
balances,
investPortResp,
paginationRes,
] = await Promise.all([
profile.getUserProfile(i.guildId ?? "", dataProfile.id),
config.vaultList(i.guildId ?? "", false, dataProfile.id),
profile.getUserSocials(target.id),
profile.getUserWallets(target.id, false),
getBalances(dataProfile.id, target.id, BalanceType.Offchain, i, "", ""),
mochiPay.getKrystalEarnPortfolio({ profile_id: dataProfile.id }),
profile.getUserActivities(dataProfile.id, {
actions: ["9", "10"],
status: "new",
Expand All @@ -154,9 +150,6 @@ async function compose(
vaults = vaultsRes.filter((v) => v.discord_guild?.name).slice(0, 5)
}

// Get first 5 invest portfolios
const investPortfolios = investPortResp.data?.slice(0, 5) ?? []

const {
onchainTotal,
cexTotal,
Expand Down Expand Up @@ -257,15 +250,6 @@ async function compose(
}),
].join("\n"),
}).addFields([
...(investPortfolios.length
? [
{
name: "Invest Portfolios",
value: composeInvestPortfolio(investPortfolios),
inline: false,
},
]
: []),
...(vaults.length
? [
{
Expand Down

0 comments on commit 40b24bc

Please sign in to comment.