Skip to content

Commit

Permalink
push fix for eth only
Browse files Browse the repository at this point in the history
  • Loading branch information
0xjojoex committed Mar 27, 2024
1 parent 276d779 commit 751a0ff
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions subgraphs/exchange-v3/template/mappings/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,10 @@ export function handleSwap(event: SwapEvent): void {

// fix for bad pricing on wbtc-weth 18450862
if (transaction.blockNumber.equals(BigInt.fromI32(18450862))) {
log.warning("bad pricing id: {}, token0: {}", [transaction.id, token0.derivedETH.toString()]);
token0.derivedETH = token0DerivedETH;
if (token0.id == "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599") {
log.warning("bad pricing id: {}, token0: {}", [transaction.id, token0.derivedETH.toString()]);
token0.derivedETH = token0DerivedETH;
}
}

token0.derivedUSD = token0.derivedETH.times(bundle.ethPriceUSD);
Expand Down

0 comments on commit 751a0ff

Please sign in to comment.