Skip to content

Commit 5a21f17

Browse files
committed
fix
1 parent 7d2d735 commit 5a21f17

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

adapters/balance/index.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,10 @@ export async function balance(
6969
block: Number(block),
7070
chain,
7171
}).then((r: any) => {
72-
if (!r.output)
73-
throw new Error(`balance call failed for ${adapter}`);
72+
if (!r.output) {
73+
console.error(`balance call failed for ${adapter} at block ${block}`);
74+
return;
75+
}
7476
if (!chainData[block].result) chainData[block].result = 0;
7577
chainData[block].result += Number(r.output);
7678
});
@@ -82,8 +84,10 @@ export async function balance(
8284
block,
8385
requery: true,
8486
}).then((r: (number | null)[]) => {
85-
if (r.includes(null))
86-
throw new Error(`balance call failed for ${adapter}`);
87+
if (r.includes(null)) {
88+
console.error(`balance call failed for ${adapter} at block ${block}`);
89+
return;
90+
}
8791
chainData[block].result = r.reduce(
8892
(p: number, c: any) => Number(p) + Number(c),
8993
0,

protocols/zora.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { manualCliff } from "../adapters/manual";
22
import { Protocol } from "../types/adapters";
33

4-
const tgeTimestamp = 1745416800;
4+
const tgeTimestamp = 1741651200;
55

66
const totalSupply = 10_000_000_000;
77

utils/chainCalls.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function filterRawAmounts(
3333
const sections: CliffAdapterResult[] = [];
3434
let depositIndex: number = 0;
3535

36-
const data = Object.values(chainData);
36+
const data = Object.values(chainData).sort((a, b) => a.timestamp - b.timestamp);
3737
for (let i = 0; i < data.length; i++) {
3838
if (!("result" in data[i])) data[i].result = i > 0 ? data[i - 1].result : 0;
3939
const thisBalance = data[i].result;

0 commit comments

Comments
 (0)