Skip to content

Commit

Permalink
fix use wrap function
Browse files Browse the repository at this point in the history
  • Loading branch information
dtmkeng committed Apr 12, 2024
1 parent 3f33168 commit cc3c1d9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions aggregators/etaswap/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import axios from "axios"
import BigNumber from "bignumber.js";
import { CHAIN } from "../../helpers/chains";
import { httpGet } from "../../utils/fetchURL";

const fetchLogs = async (timestamp: number) => {
const res = await axios.get(`https://api.etaswap.com/v1/statistics/volume/total?timestamp=${timestamp}`);
const res = await httpGet(`https://api.etaswap.com/v1/statistics/volume/total?timestamp=${timestamp}`);
return {
dailyVolume: new BigNumber(res.data.volume_USD_24h).div(100).toFixed(2),
totalVolume: new BigNumber(res.data.volume_USD_total).div(100).toFixed(2),
dailyFees: new BigNumber(res.data.fee_USD_24h).div(100).toFixed(2),
totalFees: new BigNumber(res.data.fee_USD_total).div(100).toFixed(2),
dailyVolume: new BigNumber(res.volume_USD_24h).div(100).toFixed(2),
totalVolume: new BigNumber(res.volume_USD_total).div(100).toFixed(2),
dailyFees: new BigNumber(res.fee_USD_24h).div(100).toFixed(2),
totalFees: new BigNumber(res.fee_USD_total).div(100).toFixed(2),
timestamp: timestamp,
};
};
Expand Down

0 comments on commit cc3c1d9

Please sign in to comment.