Skip to content

Commit

Permalink
change LBParams to LbpParams to reflect the naming in the schema file
Browse files Browse the repository at this point in the history
  • Loading branch information
gerrrg committed Nov 26, 2024
1 parent 35eaa2f commit d706fc2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions subgraphs/v3-pools/src/mappings/lbpool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ import { Address, BigDecimal, Bytes } from "@graphprotocol/graph-ts";
import { handlePoolCreated, PoolType } from "./common";
import { PoolCreated } from "../types/LBPoolFactory/BasePoolFactory";
import { LBPool } from "../types/LBPoolFactory/LBPool";
import { LBParams } from "../types/schema";
import { LbpParams } from "../types/schema";
import { scaleDown } from "../helpers/math";

function handleLBPoolParams(poolAddress: Address): Bytes {
let lbPool = LBPool.bind(poolAddress);
let weightsResult = lbPool.try_getNormalizedWeights();
let lbParams = new lbParams(poolAddress);
let lbpParams = new LbpParams(poolAddress);
if (lbResult.reverted) {
lbParams.weights = weightsResult.value.map<BigDecimal>((weight) =>
lbpParams.weights = weightsResult.value.map<BigDecimal>((weight) =>
scaleDown(weight, 18)
);
}
lbParams.save();
return lbParams.id;
lbpParams.save();
return lbpParams.id;
}

export function handleLBPoolCreated(event: PoolCreated): void {
Expand All @@ -26,6 +26,6 @@ export function handleLBPoolCreated(event: PoolCreated): void {
PoolType.LBPool,
1,
handleLBPoolParams,
"lbParams"
"lbpParams"
);
}

0 comments on commit d706fc2

Please sign in to comment.