Skip to content

Commit

Permalink
fix price bsc
Browse files Browse the repository at this point in the history
  • Loading branch information
dtmkeng committed Jul 31, 2023
1 parent 5d78ff4 commit 94f2f48
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fees/stargate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const mapTokenPrice: IMap = {
['0x1205f31718499dBf1fCa446663B532Ef87481fe1'.toLowerCase()]: 'ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
['0x29e38769f23701A2e4A8Ef0492e19dA4604Be62c'.toLowerCase()]: 'ethereum:0xdAC17F958D2ee523a2206206994597C13D831ec7',
['0x9aA83081AA06AF7208Dcc7A4cB72C94d057D2cda'.toLowerCase()]: 'ethereum:0xdAC17F958D2ee523a2206206994597C13D831ec7',
['0x98a5737749490856b401DB5Dc27F522fC314A4e1'.toLowerCase()]: 'bsc:0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56',
['0x98a5737749490856b401DB5Dc27F522fC314A4e1'.toLowerCase()]: 'coingecko:binance-usd',
['0x12edeA9cd262006cC3C4E77c90d2CD2DD4b1eb97'.toLowerCase()]: 'ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
['0xDecC0c09c3B5f6e92EF4184125D5648a66E35298'.toLowerCase()]: 'ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
}
Expand Down Expand Up @@ -132,6 +132,8 @@ const fetch = (chain: Chain) => {
});
const coins = [...new Set(logs_swap.concat(swap_remote).map((e: IFee) => mapTokenPrice[e.contract.toLowerCase()]))];
const prices = await getPrices(coins, timestamp);
if (prices['coingecko:binance-usd'])
prices['coingecko:binance-usd'].decimals = 18
const dailyFees = [...logs_swap, ...swap_remote].map((e: IFee) => {
const price = prices[mapTokenPrice[e.contract.toLowerCase()]].price;
const decimals = prices[mapTokenPrice[e.contract.toLowerCase()]].decimals;
Expand Down

0 comments on commit 94f2f48

Please sign in to comment.