Skip to content

Commit

Permalink
fix div
Browse files Browse the repository at this point in the history
  • Loading branch information
dtmkeng committed Oct 10, 2023
1 parent 0e88a1b commit 1f510aa
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions dexs/blex/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const allData=gql`
query get_summary($period: String!, $id: String!){
summaries(where: {period: $period, id: $id}){
tradingLPVolume
tradingVolume
}
}
`
Expand All @@ -25,9 +24,9 @@ const derivativesData=gql`

interface IGraphResponse {
summaries: Array<{
tradingVolume: string
tradingVolume: string
tradingLPVolume: string
trades: string
trades: string
openInterest: string
uniqueUsers: string
fees: string
Expand All @@ -45,16 +44,16 @@ interface IGraphResponse {
id: 'total',
period: 'total',
})

return {
timestamp: dayTimestamp,
dailyVolume:
dailyData.summaries.length == 1
? String(Number(Object.values(dailyData.summaries[0]).reduce((sum, element) => String(Number(sum) + Number(element)))) * 10 ** -30)
? String(Number(Object.values(dailyData.summaries[0]).reduce((sum, element) => String(Number(sum) + Number(element)))) * 10 ** -18)
: undefined,
totalVolume:
totalData.summaries.length == 1
? String(Number(Object.values(totalData.summaries[0]).reduce((sum, element) => String(Number(sum) + Number(element)))) * 10 ** -30)
? String(Number(Object.values(totalData.summaries[0]).reduce((sum, element) => String(Number(sum) + Number(element)))) * 10 ** -18)
: undefined,
}
}
Expand Down

0 comments on commit 1f510aa

Please sign in to comment.