Skip to content

Commit

Permalink
fix price decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
prevostc committed Jun 30, 2024
1 parent 71f917a commit b9c5b80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/clm/utils/clm-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export function fetchCLMData(clm: CLM): CLMData {
}

// price is the amount of token1 per token0, expressed with 36 decimals
const priceDecimals = BigInt.fromU32(36)
const priceDecimals = BigInt.fromU32(36).plus(token1.decimals).minus(token0.decimals)

// this can revert when the liquidity is 0
let priceOfToken0InToken1 = ZERO_BI
Expand Down

0 comments on commit b9c5b80

Please sign in to comment.