File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed
Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff 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 ,
Original file line number Diff line number Diff line change 11import { manualCliff } from "../adapters/manual" ;
22import { Protocol } from "../types/adapters" ;
33
4- const tgeTimestamp = 1745416800 ;
4+ const tgeTimestamp = 1741651200 ;
55
66const totalSupply = 10_000_000_000 ;
77
Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments