Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions packages/api/src/routes/avs/avsController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,12 @@ export async function getAVS(req: Request, res: Response) {
}
})

const shares = withOperatorShares(avs.operators).filter((s) => true)
// TODO: Add back with operator set strategies
// (s) => avs.restakeableStrategies.indexOf(s.strategyAddress.toLowerCase()) !== -1
// TODO: Select whether to use operator set strategies or all strategies
// const shares = withOperatorShares(avs.operators).filter((s) => true)
const shares = withOperatorShares(avs.operators).filter(
(s) => avs.restakeableStrategies.indexOf(s.strategyAddress.toLowerCase()) !== -1
)

const strategiesWithSharesUnderlying = withTvl ? await getStrategiesWithShareUnderlying() : []

Expand Down
7 changes: 4 additions & 3 deletions packages/api/src/utils/operatorShares.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ export function withOperatorShares(avsOperators) {
const sharesMap: IMap<string, string> = new Map()

avsOperators.map((avsOperator) => {
// TODO: Add back with operator set strategies
// TODO: Select whether to use operator set strategies or all strategies
// const shares = avsOperator.operator.shares.filter((s) => true)
const shares = avsOperator.operator.shares.filter(
(s) => true
// TODO: Add back with operator set strategies
// avsOperator.restakedStrategies.indexOf(s.strategyAddress.toLowerCase()) !== -1
(s) => avsOperator.restakedStrategies.indexOf(s.strategyAddress.toLowerCase()) !== -1
)

shares.map((s) => {
Expand Down
17 changes: 9 additions & 8 deletions packages/seeder/src/monitors/avsMetrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,16 @@ export async function monitorAvsMetrics(params: MonitorAvsMetricsParams) {
where: {
operatorAddress: {
in: avs.operators.map((o) => o.operatorAddress)
},
shares: {
some: {
strategyAddress: {
in: avs.restakeableStrategies
},
shares: { gt: '0' }
}
}
// TODO: Add back with operator set strategies
// shares: {
// some: {
// strategyAddress: {
// in: avs.restakeableStrategies
// },
// shares: { gt: '0' }
// }
// }
}
})

Expand Down