Skip to content

Commit

Permalink
fix muesliswa
Browse files Browse the repository at this point in the history
  • Loading branch information
dtmkeng committed Mar 10, 2024
1 parent 1844356 commit a4510bc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dexs/muesliswap/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ interface IVolumeall {

const historicalVolumeEndpoint = "https://analyticsv3.muesliswap.com/historical-volume";

const fetch = async (timestamp: number, _: ChainBlocks, { startOfDay, createBalances, }: FetchOptions) => {
const dailyVolume = createBalances();
const totalVolume = createBalances();
const fetch = async (options: FetchOptions) => {
const dailyVolume = options.createBalances();
const totalVolume = options.createBalances();
const vols: IVolumeall[] = (await httpGet(historicalVolumeEndpoint));
vols
.filter((volItem: IVolumeall) => Number(volItem.time) <= startOfDay)
.filter((volItem: IVolumeall) => Number(volItem.time) <= options.startOfDay)
.map(({ volume }) => totalVolume.addGasToken(volume));
dailyVolume.addGasToken(vols.find(dayItem => dayItem.time === startOfDay)?.volume)
dailyVolume.addGasToken(vols.find(dayItem => dayItem.time === options.startOfDay)?.volume)

return {
timestamp: startOfDay,
timestamp: options.startOfDay,
dailyVolume,
// totalVolume,
}
Expand Down

0 comments on commit a4510bc

Please sign in to comment.