File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -3,18 +3,11 @@ import fetchURL from "../../utils/fetchURL";
3
3
4
4
const fetch = async ( _ : any , _1 : any , { dateString } : FetchOptions ) => {
5
5
6
- const data = ( await fetchURL ( 'https://flamingo-us-1.b-cdn.net/flamingo/analytics/rolling-30-days/pool_data ' ) )
6
+ const data = ( await fetchURL ( 'https://flamingo-us-1.b-cdn.net/flamingo/analytics/rolling-30-days/total_data ' ) )
7
7
const dayData = data . find ( ( day : any ) => day . date . slice ( 0 , 10 ) === dateString )
8
8
if ( ! dayData ) throw new Error ( `No data for date ${ dateString } ` )
9
- let dailyVolume = 0 ;
10
- let dailyFees = 0
11
9
12
- Object . values ( dayData . pool_data ) . forEach ( ( pool : any ) => {
13
- if ( pool . fees_usd_total ) dailyFees += + pool . fees_usd_total
14
- if ( pool . volume_usd_total ) dailyVolume += + pool . volume_usd_total
15
- } )
16
-
17
- return { dailyVolume, dailyFees, } ;
10
+ return { dailyVolume : dayData . total_data . total_order_volume , dailyFees : dayData . total_data . total_order_fee_usd } ;
18
11
} ;
19
12
20
13
const adapter : SimpleAdapter = {
You can’t perform that action at this time.
0 commit comments