Skip to content

Commit

Permalink
fix algebra integral
Browse files Browse the repository at this point in the history
  • Loading branch information
0xoscario committed Nov 16, 2024
1 parent 9ea6e24 commit 0d8680c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,9 @@ export function PresetRanges({
: [];
}

if (isAlgebraIntegral) {
return [];
}
// if (isAlgebraIntegral) {
// return [];
// }

if (isStablecoinPair)
return [
Expand Down Expand Up @@ -563,11 +563,7 @@ export function PresetRanges({
</>
)}
</Box>
{!isGamma &&
!isUnipilot &&
!isDefiedge &&
!isSteer &&
!isAlgebraIntegral && (
{!isGamma && !isUnipilot && !isDefiedge && !isSteer && (
<>
<Box className='flex justify-between'>
{_risk && !mintInfo.invalidRange && !isStablecoinPair && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,9 @@ export function SelectRange({
onLeftRangeInput(
preset
? liquidityRangeType !==
GlobalConst.v3LiquidityRangeType.MANUAL_RANGE
GlobalConst.v3LiquidityRangeType.MANUAL_RANGE &&
liquidityRangeType !==
GlobalConst.v3LiquidityRangeType.ALGEBRA_INTEGRAL
? String(Number(priceObj.toSignificant()) * preset.min)
: priceObj
.quote(
Expand All @@ -260,7 +262,9 @@ export function SelectRange({
onRightRangeInput(
preset
? liquidityRangeType !==
GlobalConst.v3LiquidityRangeType.MANUAL_RANGE
GlobalConst.v3LiquidityRangeType.MANUAL_RANGE &&
liquidityRangeType !==
GlobalConst.v3LiquidityRangeType.ALGEBRA_INTEGRAL
? String(Number(priceObj.toSignificant()) * preset.max)
: priceObj
.quote(
Expand Down Expand Up @@ -711,7 +715,9 @@ export function SelectRange({
</small>
</Box>
)}
{liquidityRangeType === GlobalConst.v3LiquidityRangeType.MANUAL_RANGE && (
{(liquidityRangeType === GlobalConst.v3LiquidityRangeType.MANUAL_RANGE ||
liquidityRangeType ===
GlobalConst.v3LiquidityRangeType.ALGEBRA_INTEGRAL) && (
<>
{mintInfo.price && (
<Box textAlign='center'>
Expand Down
4 changes: 3 additions & 1 deletion src/pages/PoolsPage/v3/SupplyLiquidityV3/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,10 @@ export function SupplyLiquidityV3() {
{mintInfo.noLiquidity &&
baseCurrency &&
quoteCurrency &&
(liquidityRangeType ===
GlobalConst.v3LiquidityRangeType.MANUAL_RANGE ||
liquidityRangeType ===
GlobalConst.v3LiquidityRangeType.MANUAL_RANGE && (
GlobalConst.v3LiquidityRangeType.ALGEBRA_INTEGRAL) && (
<Box mb={2}>
<InitialPrice
currencyA={baseCurrency ?? undefined}
Expand Down

0 comments on commit 0d8680c

Please sign in to comment.