Skip to content

Commit

Permalink
fix fees and token price
Browse files Browse the repository at this point in the history
  • Loading branch information
dtmkeng committed Jul 22, 2024
1 parent 0b6b282 commit eced335
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions fees/size-credit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { CHAIN } from "../helpers/chains";

const SZWETH_CONTRACT = '0x974583f05de1fd18c59c77c4a8803cf0c7db5333';
const SZAUSDC_CONTRACT = '0x38978038a06a21602a4202dfa66968e7f525bf3e';
const AUSDC_CONTRACT = '0x4e65fe4dba92790696d040ac24aa414708f5c0ab';
const AUSDC_CONTRACT = '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913';
const SIZE_PROXY_CONTRACT = '0xC2a429681CAd7C1ce36442fbf7A4a68B11eFF940';

const fetch: any = async ({ createBalances, getLogs, api, getFromBlock, getToBlock }: FetchOptions) => {
Expand Down Expand Up @@ -36,14 +36,15 @@ const fetch: any = async ({ createBalances, getLogs, api, getFromBlock, getToBlo
const feeRecipient = feeConfig.feeRecipient;
logsArray.forEach((logs, i) => {
logs.forEach((log) => {
if (log.to === feeRecipient) {
if (log.to.toLowerCase() === feeRecipient.toLowerCase()) {
fees.add(FEE_MAPPING[i], Number(log.value));
}
})
})

return {
dailyFees: fees,
dailyRevenue: fees,
dailyProtocolRevenue: fees
};
};
Expand All @@ -65,4 +66,4 @@ const adapter: Adapter = {
},
}
}
export default adapter;
export default adapter;

0 comments on commit eced335

Please sign in to comment.