Skip to content

Commit

Permalink
Correct pool value being updated for pool cross checks
Browse files Browse the repository at this point in the history
  • Loading branch information
cujowolf committed Dec 13, 2023
1 parent 7dc8607 commit b3b1dad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions projects/subgraph-bean/src/utils/Cross.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ export function checkPoolCross(pool: string, timestamp: BigInt, blockNumber: Big
let poolInfo = loadOrCreatePool(pool, blockNumber);
let token = poolInfo.bean;
let bean = loadBean(token);
let poolHourly = loadOrCreatePoolHourlySnapshot(token, timestamp, BigInt.fromI32(bean.lastSeason));
let poolDaily = loadOrCreatePoolDailySnapshot(token, timestamp, blockNumber);
let poolHourly = loadOrCreatePoolHourlySnapshot(pool, timestamp, BigInt.fromI32(bean.lastSeason));
let poolDaily = loadOrCreatePoolDailySnapshot(pool, timestamp, blockNumber);

if (oldPrice >= ONE_BD && newPrice < ONE_BD) {
let cross = loadOrCreatePoolCross(poolInfo.crosses, pool, timestamp);
Expand Down

0 comments on commit b3b1dad

Please sign in to comment.