From ad1a2dda10e5fa03377455f18f4b837d7ff0e9c5 Mon Sep 17 00:00:00 2001 From: Wojciech Date: Sat, 25 Nov 2023 23:12:17 +0100 Subject: [PATCH 1/6] Update sdk --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 73217618f..0baaf11e9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "@hookform/error-message": "^0.0.3", "@hookform/resolvers": "^0.1.0", "@invariant-labs/bonds-sdk": "0.1.0", - "@invariant-labs/sdk": "0.9.60", + "@invariant-labs/sdk": "0.9.61", "@invariant-labs/staker-sdk": "0.2.11", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -2848,9 +2848,9 @@ } }, "node_modules/@invariant-labs/sdk": { - "version": "0.9.60", - "resolved": "https://registry.npmjs.org/@invariant-labs/sdk/-/sdk-0.9.60.tgz", - "integrity": "sha512-SNDb435CaZjIMJlBkvKQWwmz4m28FzDiFZKuGJFSwRPEedy9CVBk8n7mnTtLzI/ePDc2Zq54EVQoVxU6l1hdtQ==", + "version": "0.9.61", + "resolved": "https://registry.npmjs.org/@invariant-labs/sdk/-/sdk-0.9.61.tgz", + "integrity": "sha512-uLyu8p3aocBMTLbwDFFr0zw/egEl7td214Eqo40ascKJP9GNQEv6hkBBoOy1AO0WVzp8Xap/RasiZkxt0CL1/g==", "dependencies": { "@project-serum/anchor": "0.21.0", "@solana/spl-token-registry": "^0.2.4484", diff --git a/package.json b/package.json index 2cb89de59..c7ef8a59b 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "@hookform/error-message": "^0.0.3", "@hookform/resolvers": "^0.1.0", "@invariant-labs/bonds-sdk": "0.1.0", - "@invariant-labs/sdk": "0.9.60", + "@invariant-labs/sdk": "0.9.61", "@invariant-labs/staker-sdk": "0.2.11", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", From 11df88aa4461ac31627a7b3a1d578dc44708ab2d Mon Sep 17 00:00:00 2001 From: Adrian Date: Sun, 26 Nov 2023 02:00:37 +0100 Subject: [PATCH 2/6] safe concentration data --- src/store/consts/static.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/store/consts/static.ts b/src/store/consts/static.ts index f279c19c9..c7fff1841 100644 --- a/src/store/consts/static.ts +++ b/src/store/consts/static.ts @@ -230,7 +230,7 @@ const mainnetBestTiersCreator = () => { bestTiers.push({ tokenX, tokenY, - bestTierIndex: 1 + bestTierIndex: 2 }) } } @@ -244,7 +244,7 @@ const mainnetBestTiersCreator = () => { bestTiers.push({ tokenX, tokenY, - bestTierIndex: 1 + bestTierIndex: 2 }) } } @@ -262,22 +262,22 @@ export const bestTiers: Record = { { tokenX: USDC_DEV.address, tokenY: WSOL_DEV.address, - bestTierIndex: 1 + bestTierIndex: 2 }, { tokenX: USDC_DEV.address, tokenY: BTC_DEV.address, - bestTierIndex: 1 + bestTierIndex: 2 }, { tokenX: RENDOGE_DEV.address, tokenY: BTC_DEV.address, - bestTierIndex: 3 + bestTierIndex: 4 }, { tokenX: USDC_DEV.address, tokenY: RENDOGE_DEV.address, - bestTierIndex: 3 + bestTierIndex: 4 } ], Testnet: [], @@ -352,10 +352,10 @@ export const WSOL_POSITION_INIT_LAMPORTS = new BN(6164600) export const WSOL_POOL_INIT_LAMPORTS = new BN(106000961) -export const minimumRangesForTiers = [20, 20, 20, 20, 74, 80, 64, 28, 28, 28, 28, 28] +export const minimumRangesForTiers = [20, 20, 20, 20, 20, 74, 80, 64, 64, 28, 28, 28, 28, 28, 28] export const maxSafeConcentrationsForTiers = [ - 400.52, 400.52, 400.52, 400.52, 41.49, 21.47, 8.13, 5.45, 5.45, 5.45, 5.45, 5.45 + 400.52, 400.52, 400.52, 400.52, 400.52, 41.49, 21.47, 8.13, 8.13, 5.45, 5.45, 5.45, 5.45, 5.45, 5.45 ] export const ALL_FEE_TIERS_DATA = FEE_TIERS.map((tier, index) => ({ From 71df9b4235bcbbbff9ee946c28c14770bd6f6ff5 Mon Sep 17 00:00:00 2001 From: Adrian Date: Sun, 26 Nov 2023 02:18:00 +0100 Subject: [PATCH 3/6] lint --- src/store/consts/static.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/store/consts/static.ts b/src/store/consts/static.ts index c7fff1841..79a880ef2 100644 --- a/src/store/consts/static.ts +++ b/src/store/consts/static.ts @@ -355,7 +355,8 @@ export const WSOL_POOL_INIT_LAMPORTS = new BN(106000961) export const minimumRangesForTiers = [20, 20, 20, 20, 20, 74, 80, 64, 64, 28, 28, 28, 28, 28, 28] export const maxSafeConcentrationsForTiers = [ - 400.52, 400.52, 400.52, 400.52, 400.52, 41.49, 21.47, 8.13, 8.13, 5.45, 5.45, 5.45, 5.45, 5.45, 5.45 + 400.52, 400.52, 400.52, 400.52, 400.52, 41.49, 21.47, 8.13, 8.13, 5.45, 5.45, 5.45, 5.45, 5.45, + 5.45 ] export const ALL_FEE_TIERS_DATA = FEE_TIERS.map((tier, index) => ({ From 139c5823206446227c2258ebd34a5c6e1e12689e Mon Sep 17 00:00:00 2001 From: awojciak Date: Mon, 27 Nov 2023 10:04:45 +0100 Subject: [PATCH 4/6] remove unsafe --- .../ConcentrationSlider.stories.tsx | 1 - .../ConcentrationSlider.tsx | 4 +- .../NewPosition/ConcentrationSlider/style.ts | 84 +++++++++---------- .../NewPosition/NewPosition.stories.tsx | 30 +++---- src/components/NewPosition/NewPosition.tsx | 3 - .../RangeSelector/RangeSelector.stories.tsx | 3 - .../RangeSelector/RangeSelector.tsx | 53 +----------- .../NewPositionWrapper/NewPositionWrapper.tsx | 1 - src/store/consts/static.ts | 6 -- 9 files changed, 50 insertions(+), 135 deletions(-) diff --git a/src/components/NewPosition/ConcentrationSlider/ConcentrationSlider.stories.tsx b/src/components/NewPosition/ConcentrationSlider/ConcentrationSlider.stories.tsx index f0e16cc34..1044fd26d 100644 --- a/src/components/NewPosition/ConcentrationSlider/ConcentrationSlider.stories.tsx +++ b/src/components/NewPosition/ConcentrationSlider/ConcentrationSlider.stories.tsx @@ -19,7 +19,6 @@ storiesOf('position/concentrationSlider', module).add('default', () => { console.log(val) }} valueIndex={3} - unsafePercent={60} /> ) diff --git a/src/components/NewPosition/ConcentrationSlider/ConcentrationSlider.tsx b/src/components/NewPosition/ConcentrationSlider/ConcentrationSlider.tsx index 51538bb0a..7ded7a7f2 100644 --- a/src/components/NewPosition/ConcentrationSlider/ConcentrationSlider.tsx +++ b/src/components/NewPosition/ConcentrationSlider/ConcentrationSlider.tsx @@ -6,7 +6,6 @@ export interface IProps { values: number[] valueChangeHandler: (value: number) => void valueIndex: number - unsafePercent: number dragHandler: (value: number) => void } @@ -43,10 +42,9 @@ export const ConcentrationSlider: React.FC = ({ values, valueChangeHandler, valueIndex, - unsafePercent, dragHandler }) => { - const sliderClasses = useSliderStyles({ valuesLength: values.length, unsafePercent }) + const sliderClasses = useSliderStyles({ valuesLength: values.length }) const onChangeCommited = useCallback( (_e: ChangeEvent<{}>, value: number | number[]) => { diff --git a/src/components/NewPosition/ConcentrationSlider/style.ts b/src/components/NewPosition/ConcentrationSlider/style.ts index f28cc04ce..b661b3f4a 100644 --- a/src/components/NewPosition/ConcentrationSlider/style.ts +++ b/src/components/NewPosition/ConcentrationSlider/style.ts @@ -37,55 +37,47 @@ export const useThumbStyles = makeStyles(() => ({ } })) -export const useSliderStyles = makeStyles( - () => ({ - root: { - width: '100%', - paddingBlock: 13 - }, - rail: ({ unsafePercent }) => ({ - background: - unsafePercent > 100 - ? colors.invariant.green - : `linear-gradient(90deg, #2EE09A 0%, #2EE09A ${unsafePercent}%, #FB555F ${Math.min( - unsafePercent + 5, - 100 - )}%)`, - height: 6, - opacity: 1 - }), - markLabel: ({ valuesLength }) => ({ - color: colors.invariant.text, - ...typography.body1, - marginTop: 10, - top: 26, +export const useSliderStyles = makeStyles(() => ({ + root: { + width: '100%', + paddingBlock: 13 + }, + rail: { + background: colors.invariant.green, + height: 6, + opacity: 1 + }, + markLabel: ({ valuesLength }) => ({ + color: colors.invariant.text, + ...typography.body1, + marginTop: 10, + top: 26, - '&[data-index="0"]': { - transform: 'translateX(-30%)' - }, + '&[data-index="0"]': { + transform: 'translateX(-30%)' + }, - [`&[data-index="${valuesLength - 1}"]`]: { - transform: 'translateX(-90%)' - } - }), - mark: ({ valuesLength, unsafePercent }) => ({ - display: 'none', + [`&[data-index="${valuesLength - 1}"]`]: { + transform: 'translateX(-90%)' + } + }), + mark: ({ valuesLength }) => ({ + display: 'none', - [`&[data-index="${valuesLength - 1}"], &[data-index="0"]`]: { - display: 'block', - width: 14, - height: 14, - borderRadius: '100%', - transform: 'translate(-6px, -4px)' - }, + [`&[data-index="${valuesLength - 1}"], &[data-index="0"]`]: { + display: 'block', + width: 14, + height: 14, + borderRadius: '100%', + transform: 'translate(-6px, -4px)' + }, - '&[data-index="0"]': { - background: colors.invariant.green - }, + '&[data-index="0"]': { + background: colors.invariant.green + }, - [`&[data-index="${valuesLength - 1}"]`]: { - background: unsafePercent > 100 ? colors.invariant.green : colors.invariant.Error - } - }) + [`&[data-index="${valuesLength - 1}"]`]: { + background: colors.invariant.green + } }) -) +})) diff --git a/src/components/NewPosition/NewPosition.stories.tsx b/src/components/NewPosition/NewPosition.stories.tsx index 60720884a..ff5eb4184 100644 --- a/src/components/NewPosition/NewPosition.stories.tsx +++ b/src/components/NewPosition/NewPosition.stories.tsx @@ -81,28 +81,23 @@ storiesOf('position/newPosition', module) feeTiers={[ { feeValue: 0.02, - minimumRange: 20, - maxSafeConcentration: 400 + minimumRange: 20 }, { feeValue: 0.04, - minimumRange: 80, - maxSafeConcentration: 40 + minimumRange: 80 }, { feeValue: 0.1, - minimumRange: 64, - maxSafeConcentration: 34 + minimumRange: 64 }, { feeValue: 0.3, - minimumRange: 50, - maxSafeConcentration: 28 + minimumRange: 50 }, { feeValue: 1, - minimumRange: 35, - maxSafeConcentration: 5 + minimumRange: 35 } ]} ticksLoading={false} @@ -167,28 +162,23 @@ storiesOf('position/newPosition', module) feeTiers={[ { feeValue: 0.02, - minimumRange: 20, - maxSafeConcentration: 400 + minimumRange: 20 }, { feeValue: 0.04, - minimumRange: 80, - maxSafeConcentration: 40 + minimumRange: 80 }, { feeValue: 0.1, - minimumRange: 64, - maxSafeConcentration: 34 + minimumRange: 64 }, { feeValue: 0.3, - minimumRange: 50, - maxSafeConcentration: 28 + minimumRange: 50 }, { feeValue: 1, - minimumRange: 35, - maxSafeConcentration: 5 + minimumRange: 35 } ]} ticksLoading={false} diff --git a/src/components/NewPosition/NewPosition.tsx b/src/components/NewPosition/NewPosition.tsx index 94e268bfe..f2556100e 100644 --- a/src/components/NewPosition/NewPosition.tsx +++ b/src/components/NewPosition/NewPosition.tsx @@ -59,7 +59,6 @@ export interface INewPosition { feeTiers: Array<{ feeValue: number minimumRange: number - maxSafeConcentration: number }> ticksLoading: boolean showNoConnected?: boolean @@ -497,12 +496,10 @@ export const NewPosition: React.FC = ({ initialIsDiscreteValue={initialIsDiscreteValue} onDiscreteChange={onDiscreteChange} isConcentrated={isConcentrated} - bestTierIndex={bestTierIndex} hasTicksError={hasTicksError} reloadHandler={reloadHandler} volumeRange={plotVolumeRange} minimumRange={feeTiers[currentFeeIndex].minimumRange} - maxSafeConcentration={feeTiers[currentFeeIndex].maxSafeConcentration} /> ) : ( {}} minimumRange={20} - maxSafeConcentration={400.52} /> )) .add('blocked', () => ( @@ -70,7 +69,6 @@ storiesOf('position/rangeSelector', module) poolIndex={null} reloadHandler={() => {}} minimumRange={20} - maxSafeConcentration={400.52} /> )) .add('concentrated', () => ( @@ -97,6 +95,5 @@ storiesOf('position/rangeSelector', module) poolIndex={null} reloadHandler={() => {}} minimumRange={20} - maxSafeConcentration={400.52} /> )) diff --git a/src/components/NewPosition/RangeSelector/RangeSelector.tsx b/src/components/NewPosition/RangeSelector/RangeSelector.tsx index d14637df0..a847e0864 100644 --- a/src/components/NewPosition/RangeSelector/RangeSelector.tsx +++ b/src/components/NewPosition/RangeSelector/RangeSelector.tsx @@ -15,7 +15,6 @@ import { MAX_TICK } from '@invariant-labs/sdk/src' import PlotTypeSwitch from '@components/PlotTypeSwitch/PlotTypeSwitch' import ConcentrationSlider from '../ConcentrationSlider/ConcentrationSlider' import { getConcentrationArray, getMaxTick, getMinTick } from '@invariant-labs/sdk/lib/utils' -import questionMark from '@static/svg/questionMark.svg' import loader from '@static/gif/loader.gif' import useStyles from './style' import activeLiquidity from '@static/svg/activeLiquidity.svg' @@ -38,7 +37,6 @@ export interface IRangeSelector { onDiscreteChange: (val: boolean) => void isConcentrated?: boolean poolIndex: number | null - bestTierIndex?: number hasTicksError?: boolean reloadHandler: () => void volumeRange?: { @@ -46,7 +44,6 @@ export interface IRangeSelector { max: number } minimumRange: number - maxSafeConcentration: number } export const RangeSelector: React.FC = ({ @@ -67,12 +64,10 @@ export const RangeSelector: React.FC = ({ onDiscreteChange, isConcentrated = false, poolIndex, - bestTierIndex, hasTicksError, reloadHandler, volumeRange, - minimumRange, - maxSafeConcentration + minimumRange }) => { const classes = useStyles() @@ -304,19 +299,6 @@ export const RangeSelector: React.FC = ({ } }, [midPrice.index, concentrationArray]) - const unsafeIndex = useMemo( - () => - typeof bestTierIndex === 'undefined' - ? concentrationArray.findIndex(val => val >= maxSafeConcentration) - : concentrationArray.findIndex(val => val >= maxSafeConcentration), - [concentrationArray, maxSafeConcentration, bestTierIndex] - ) - - const unsafePercent = useMemo( - () => (unsafeIndex === -1 ? 101 : (unsafeIndex / concentrationArray.length) * 100), - [concentrationArray, unsafeIndex] - ) - return ( @@ -500,40 +482,7 @@ export const RangeSelector: React.FC = ({ dragHandler={value => { setConcentrationIndex(value) }} - unsafePercent={unsafePercent} /> - {unsafeIndex !== -1 && concentrationIndex >= unsafeIndex ? ( - - - Extremely high concentration - - - High concentration enforces that your liquidity is provided within a tight - price range. Higher concentration will allow you to earn more, but it has - additional risk. Choosing high concentration is appropriate if you assume low - price volatility. -
-
- Make sure you want to open a position in the selected price range. Remember - that the position only makes a profit if the price is within range. - - } - placement='bottom' - classes={{ - tooltip: classes.tooltip - }}> - -
-
- ) : null}
) : ( diff --git a/src/containers/NewPositionWrapper/NewPositionWrapper.tsx b/src/containers/NewPositionWrapper/NewPositionWrapper.tsx index 6af3d0e9c..33b6af5b1 100644 --- a/src/containers/NewPositionWrapper/NewPositionWrapper.tsx +++ b/src/containers/NewPositionWrapper/NewPositionWrapper.tsx @@ -432,7 +432,6 @@ export const NewPositionWrapper = () => { }} feeTiers={ALL_FEE_TIERS_DATA.map(tier => ({ feeValue: +printBN(tier.tier.fee, DECIMAL - 2), - maxSafeConcentration: tier.maxSafeConcentration, minimumRange: tier.minimumRange }))} data={data} diff --git a/src/store/consts/static.ts b/src/store/consts/static.ts index 79a880ef2..4a3d62fb9 100644 --- a/src/store/consts/static.ts +++ b/src/store/consts/static.ts @@ -354,15 +354,9 @@ export const WSOL_POOL_INIT_LAMPORTS = new BN(106000961) export const minimumRangesForTiers = [20, 20, 20, 20, 20, 74, 80, 64, 64, 28, 28, 28, 28, 28, 28] -export const maxSafeConcentrationsForTiers = [ - 400.52, 400.52, 400.52, 400.52, 400.52, 41.49, 21.47, 8.13, 8.13, 5.45, 5.45, 5.45, 5.45, 5.45, - 5.45 -] - export const ALL_FEE_TIERS_DATA = FEE_TIERS.map((tier, index) => ({ tier, minimumRange: minimumRangesForTiers[index], - maxSafeConcentration: maxSafeConcentrationsForTiers[index], primaryIndex: index })).slice(3) // remove slice if all tiers should be visible From 190e0140af077654c160daae654216e6ba84a1ac Mon Sep 17 00:00:00 2001 From: awojciak Date: Mon, 27 Nov 2023 10:48:09 +0100 Subject: [PATCH 5/6] use min range 1 --- .../NewPosition/NewPosition.stories.tsx | 30 +++++++------------ src/components/NewPosition/NewPosition.tsx | 2 -- .../RangeSelector/RangeSelector.stories.tsx | 3 -- .../RangeSelector/RangeSelector.tsx | 16 +++++----- .../NewPositionWrapper/NewPositionWrapper.tsx | 3 +- src/store/consts/static.ts | 3 -- 6 files changed, 18 insertions(+), 39 deletions(-) diff --git a/src/components/NewPosition/NewPosition.stories.tsx b/src/components/NewPosition/NewPosition.stories.tsx index ff5eb4184..ccd493540 100644 --- a/src/components/NewPosition/NewPosition.stories.tsx +++ b/src/components/NewPosition/NewPosition.stories.tsx @@ -80,24 +80,19 @@ storiesOf('position/newPosition', module) calcAmount={() => new BN(1)} feeTiers={[ { - feeValue: 0.02, - minimumRange: 20 + feeValue: 0.02 }, { - feeValue: 0.04, - minimumRange: 80 + feeValue: 0.04 }, { - feeValue: 0.1, - minimumRange: 64 + feeValue: 0.1 }, { - feeValue: 0.3, - minimumRange: 50 + feeValue: 0.3 }, { - feeValue: 1, - minimumRange: 35 + feeValue: 1 } ]} ticksLoading={false} @@ -161,24 +156,19 @@ storiesOf('position/newPosition', module) calcAmount={() => new BN(1)} feeTiers={[ { - feeValue: 0.02, - minimumRange: 20 + feeValue: 0.02 }, { - feeValue: 0.04, - minimumRange: 80 + feeValue: 0.04 }, { - feeValue: 0.1, - minimumRange: 64 + feeValue: 0.1 }, { - feeValue: 0.3, - minimumRange: 50 + feeValue: 0.3 }, { - feeValue: 1, - minimumRange: 35 + feeValue: 1 } ]} ticksLoading={false} diff --git a/src/components/NewPosition/NewPosition.tsx b/src/components/NewPosition/NewPosition.tsx index f2556100e..80a83ee85 100644 --- a/src/components/NewPosition/NewPosition.tsx +++ b/src/components/NewPosition/NewPosition.tsx @@ -58,7 +58,6 @@ export interface INewPosition { ) => BN feeTiers: Array<{ feeValue: number - minimumRange: number }> ticksLoading: boolean showNoConnected?: boolean @@ -499,7 +498,6 @@ export const NewPosition: React.FC = ({ hasTicksError={hasTicksError} reloadHandler={reloadHandler} volumeRange={plotVolumeRange} - minimumRange={feeTiers[currentFeeIndex].minimumRange} /> ) : ( {}} poolIndex={null} reloadHandler={() => {}} - minimumRange={20} /> )) .add('blocked', () => ( @@ -68,7 +67,6 @@ storiesOf('position/rangeSelector', module) onDiscreteChange={() => {}} poolIndex={null} reloadHandler={() => {}} - minimumRange={20} /> )) .add('concentrated', () => ( @@ -94,6 +92,5 @@ storiesOf('position/rangeSelector', module) isConcentrated poolIndex={null} reloadHandler={() => {}} - minimumRange={20} /> )) diff --git a/src/components/NewPosition/RangeSelector/RangeSelector.tsx b/src/components/NewPosition/RangeSelector/RangeSelector.tsx index a847e0864..7b52ceebf 100644 --- a/src/components/NewPosition/RangeSelector/RangeSelector.tsx +++ b/src/components/NewPosition/RangeSelector/RangeSelector.tsx @@ -43,7 +43,6 @@ export interface IRangeSelector { min: number max: number } - minimumRange: number } export const RangeSelector: React.FC = ({ @@ -66,8 +65,7 @@ export const RangeSelector: React.FC = ({ poolIndex, hasTicksError, reloadHandler, - volumeRange, - minimumRange + volumeRange }) => { const classes = useStyles() @@ -172,7 +170,7 @@ export const RangeSelector: React.FC = ({ const { leftRange, rightRange } = calculateConcentrationRange( tickSpacing, concentrationArray[0], - minimumRange, + 1, midPrice.index, isXtoY ) @@ -259,8 +257,8 @@ export const RangeSelector: React.FC = ({ } const concentrationArray = useMemo( - () => getConcentrationArray(tickSpacing, minimumRange, midPrice.index).sort((a, b) => a - b), - [tickSpacing, midPrice.index, minimumRange] + () => getConcentrationArray(tickSpacing, 1, midPrice.index).sort((a, b) => a - b), + [tickSpacing, midPrice.index] ) useEffect(() => { @@ -270,7 +268,7 @@ export const RangeSelector: React.FC = ({ const { leftRange, rightRange } = calculateConcentrationRange( tickSpacing, concentrationArray[0], - minimumRange, + 1, midPrice.index, isXtoY ) @@ -290,7 +288,7 @@ export const RangeSelector: React.FC = ({ const { leftRange, rightRange } = calculateConcentrationRange( tickSpacing, concentrationArray[index], - minimumRange, + 1, midPrice.index, isXtoY ) @@ -472,7 +470,7 @@ export const RangeSelector: React.FC = ({ const { leftRange, rightRange } = calculateConcentrationRange( tickSpacing, concentrationArray[value], - minimumRange, + 1, midPrice.index, isXtoY ) diff --git a/src/containers/NewPositionWrapper/NewPositionWrapper.tsx b/src/containers/NewPositionWrapper/NewPositionWrapper.tsx index 33b6af5b1..6f124e329 100644 --- a/src/containers/NewPositionWrapper/NewPositionWrapper.tsx +++ b/src/containers/NewPositionWrapper/NewPositionWrapper.tsx @@ -431,8 +431,7 @@ export const NewPositionWrapper = () => { setFeeIndex(feeTierIndex) }} feeTiers={ALL_FEE_TIERS_DATA.map(tier => ({ - feeValue: +printBN(tier.tier.fee, DECIMAL - 2), - minimumRange: tier.minimumRange + feeValue: +printBN(tier.tier.fee, DECIMAL - 2) }))} data={data} midPrice={midPrice} diff --git a/src/store/consts/static.ts b/src/store/consts/static.ts index 4a3d62fb9..2044c443d 100644 --- a/src/store/consts/static.ts +++ b/src/store/consts/static.ts @@ -352,11 +352,8 @@ export const WSOL_POSITION_INIT_LAMPORTS = new BN(6164600) export const WSOL_POOL_INIT_LAMPORTS = new BN(106000961) -export const minimumRangesForTiers = [20, 20, 20, 20, 20, 74, 80, 64, 64, 28, 28, 28, 28, 28, 28] - export const ALL_FEE_TIERS_DATA = FEE_TIERS.map((tier, index) => ({ tier, - minimumRange: minimumRangesForTiers[index], primaryIndex: index })).slice(3) // remove slice if all tiers should be visible From 9469efa35be7a07c29b4a019723d4eacd1801895 Mon Sep 17 00:00:00 2001 From: awojciak Date: Mon, 27 Nov 2023 11:05:22 +0100 Subject: [PATCH 6/6] remove tier 50 --- src/store/consts/static.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store/consts/static.ts b/src/store/consts/static.ts index 2044c443d..67906ef77 100644 --- a/src/store/consts/static.ts +++ b/src/store/consts/static.ts @@ -355,6 +355,6 @@ export const WSOL_POOL_INIT_LAMPORTS = new BN(106000961) export const ALL_FEE_TIERS_DATA = FEE_TIERS.map((tier, index) => ({ tier, primaryIndex: index -})).slice(3) // remove slice if all tiers should be visible +})).slice(3, -1) // remove slice if all tiers should be visible export { SolanaNetworks, DEFAULT_PUBLICKEY, MAX_U64, NetworkType }