Skip to content

Commit

Permalink
add linkedProtocols field to parent protocl
Browse files Browse the repository at this point in the history
  • Loading branch information
g1nt0ki committed Jan 19, 2025
1 parent 99a356f commit f97f9bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion defi/src/api2/cron-task/dimensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -513,10 +513,11 @@ function mergeChildRecords(protocol: any, childProtocolData: any[]) {
const parentRecords: any = {}
const { info, } = protocol
info.childProtocols = childProtocolData.map(({ info }: any) => info?.name ?? info?.displayName)
info.linkedProtocols = info.childProtocols.concat([info.name])
childProtocolData.forEach(({ records, info: childData }: any) => {

const versionKey = childData.name ?? childData.displayName ?? childData.versionKey
childData.linkedProtocols = info.childProtocols.concat([info.name])
childData.linkedProtocols = info.linkedProtocols

if (!versionKey) console.log('versionKey is missing', childData)

Expand Down

0 comments on commit f97f9bd

Please sign in to comment.