Skip to content

Commit

Permalink
Merge pull request #1920 from literallymarvellous/fix/pear-protocol
Browse files Browse the repository at this point in the history
fix(pear-protocol): use timestamp
  • Loading branch information
dtmkeng authored Sep 18, 2024
2 parents c9b392e + c385163 commit f1de16d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions dexs/pear-protocol/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@ import { Adapter, BreakdownAdapter, FetchOptions } from "../../adapters/types";
import { CHAIN } from "../../helpers/chains";
import { httpGet } from "../../utils/fetchURL";

const fetch = async (
timestamp: number,
chainBlocks: any,
options: FetchOptions
) => {
const url = "https://www.api.pearprotocol.io/v1/metric";
const fetch = async (timestamp: number) => {
const url = `https://www.api.pearprotocol.io/v1/metric?timestamp=${timestamp}`;
const response = await httpGet(url);

const totalVolume = response.payload.totalVolume;
Expand Down
2 changes: 1 addition & 1 deletion fees/pear-protocol/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { CHAIN } from "../../helpers/chains";
import { httpGet } from "../../utils/fetchURL";

const fetch = async (timestamp: number) => {
const url = "https://www.api.pearprotocol.io/v1/metric";
const url = `https://www.api.pearprotocol.io/v1/metric?timestamp=${timestamp}`;
const response = await httpGet(url);
const totalFees = response.payload.totalFees;
const dailyFees = response.payload.dailyFees;
Expand Down

0 comments on commit f1de16d

Please sign in to comment.