Skip to content

Commit

Permalink
Merge pull request #60 from DefiLlama/clearpoolWIP
Browse files Browse the repository at this point in the history
append
  • Loading branch information
waynebruce0x authored Jun 26, 2023
2 parents 6fcd9f2 + 31441da commit fa2e030
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
16 changes: 0 additions & 16 deletions adapters/conic-finance/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,5 @@ export async function rebalancing(): Promise<CliffAdapterResult[]> {
}),
);

// const sections: CliffAdapterResult[] = [];
// let atStart: boolean = true;
// for (let i = 0; i < emitted.length; i++) {
// const thisBalance: number | null = emitted[i];

// if ((atStart && thisBalance == 0) || thisBalance == null) continue;
// atStart = false;

// const amount = (thisBalance - emitted[i - 1]) / 10 ** decimals;
// if (amount == 0) continue;

// const start = blockHeights[i].timestamp;
// sections.push({ type: "cliff", start, amount });
// }

// return sections;
return filterRawAmounts(chainData, decimals);
}
4 changes: 1 addition & 3 deletions utils/convertToChartData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ async function appendMissingDataSections(
let res = await fetch(`https://api.llama.fi/emission/${protocol}`).then((r) =>
r.json(),
);
// res = res.body ? JSON.parse(res.body).data : [];
res = res.body ? JSON.parse(res.body).data : [];

res = [];
incompleteSections.map((i: IncompleteSection) => {
const sectionRes: any = res.find((s: ApiChartData) => s.label == i.key);

Expand Down Expand Up @@ -218,7 +217,6 @@ function consolidateDuplicateKeys(data: ChartSection[], isTest: boolean) {
const maxSectionLength: number = Math.max(...sectionLengths);

data.map((d: any) => {
// if (d.section != "Rewards") return;
const sortedKeys = sortedData.map((s: any) => s.section);

// normalize to extrapolations
Expand Down

0 comments on commit fa2e030

Please sign in to comment.