Skip to content

Commit

Permalink
fix data maestro
Browse files Browse the repository at this point in the history
  • Loading branch information
dtmkeng committed Jul 3, 2023
1 parent 1d1434f commit 50f6046
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fees/maestro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const graph = (chain: Chain) => {
const endblock = (await getBlock(toTimestamp, chain, {}));
const query = `
select
${chain === "bsc"?"tx_json['value']":"eth_value"}
${chain === "bsc"?"BNB_VALUE":"eth_value"}
from
${chain}.core.fact_transactions
WHERE to_address = '0xcac0f1a06d3f02397cfb6d7077321d73b504916e'
Expand All @@ -33,9 +33,6 @@ const graph = (chain: Chain) => {

const value: string[] = (await queryFlipside(query)).flat();
let amount = value.reduce((a: number, b: string) => a + Number(b), 0)
if(chain==="bsc"){
amount /= 1e18;
}
const gasId = gasTokenId[chain];
const gasIdPrice = (await getPrices([gasId], timestamp))[gasId].price;
const dailyFees = (amount * gasIdPrice)
Expand Down

0 comments on commit 50f6046

Please sign in to comment.