From f97f9bdd541830b6a839c99ae330859d87f09541 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Sun, 19 Jan 2025 21:51:11 +0100 Subject: [PATCH] add linkedProtocols field to parent protocl --- defi/src/api2/cron-task/dimensions.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/defi/src/api2/cron-task/dimensions.ts b/defi/src/api2/cron-task/dimensions.ts index 90be28af05..d758c2a93b 100644 --- a/defi/src/api2/cron-task/dimensions.ts +++ b/defi/src/api2/cron-task/dimensions.ts @@ -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)