diff --git a/packages/swap-router/.ultra.cache.json b/packages/swap-router/.ultra.cache.json index 75a2852d6..fa109ce16 100644 --- a/packages/swap-router/.ultra.cache.json +++ b/packages/swap-router/.ultra.cache.json @@ -1 +1 @@ -{"files":{".vscode":"1700971955685.2515","build":"1701256570289.2512","node_modules":"1700891704503.8325",".eslintignore":"7de3bd702df2dee92c033c49abbedd0b0f7452e6",".eslintrc.js":"ca4815a5cf5cffa1d3fb4a014c8c602f852b002a",".gitignore":"c87c9b392c0200d9c9dafc444386ad3e15a85c64",".prettierignore":"47bb4656eb55860a075be7799cba7fa955b68141",".prettierrc":"fe5f744c7a08b128c935d1e1aed3e8a577e74507","jest.config.json":"2e496ee6bd64eb237161dcd69a6957eff2df584d","package.json":"4dda70ca76fb6022f6cb20852ecd8d2d95d638d2","src/common/array.util.ts":"9482ab121d34cc7e08a0cd33b49173b0b85823d8","src/common/bigint.util.ts":"343f4c85ca1f6c840ade68c259ed82bf5b159fb0","src/common/index.ts":"861a3167cddfc93e9eb1b6a4ae8229bb9dc2f8fd","src/common/mapper.ts":"f7d7b491dff443911a978b34e4cb378bee46c2b7","src/common/queue.ts":"ad096fefbe1c5a7339b536b0b8d39dba661b520e","src/common/test.util.ts":"3e500df6ec27ba98606acbfcaec9243e22862e43","src/constants/index.ts":"9605b149deb525c25f6e93420bbc433ff1c75cd0","src/constants/math.constant.ts":"b617851527cabcc9c3bce2c8e39208001d379ad6","src/constants/swap.constant.ts":"53e280147c68acfba490bc1f9a0b7bb1580e7280","src/index.ts":"691efb21a28bd3f0e6437edcb16192789dbbb7f6","src/swap-router/index.ts":"effaf28a826bdf1441437643e8343e7fbd8026b1","src/swap-router/swap-router-default.spec.ts":"f980bc94753df130c950eb80d8709b62ec3276fa","src/swap-router/swap-router-multi-higher-range-position-pool.spec.ts":"683ce3a82d73e915018e772723700905c3ff7c92","src/swap-router/swap-router-multi-lower-range-position-pool.spec.ts":"93bfd18d0a297f3c66743cddcf2fe10c3764e250","src/swap-router/swap-router-multi-pair-pools.spec.ts":"5fbd55be39012d46adbdc91a1111dca2aafd314d","src/swap-router/swap-router-multi-route.spec.ts":"771df497876b6bc027dc7b65d03e53209538bf2e","src/swap-router/swap-router-single-pair-pools.spec.ts":"3954e9057ef9534a3724dc960c291281d1a4ef52","src/swap-router/swap-router.ts":"606de3d518665d58f5cbafb55f45d92c30dab77d","src/swap-router/swap-router.types.ts":"2a48987217df238256a0721d227952142a37ce08","src/swap-router/utility/index.ts":"4973874904dd9d77d037d72b1ec8aed397716a38","src/swap-router/utility/route.util.ts":"d492418c9184e42d3ef29d7760eb18fa013f54c6","src/swap-simulator/index.ts":"ef493c5977bdf1123d1197b804f2344ee463870c","src/swap-simulator/swap-simulator-default.spec.ts":"867788b12ccc70abe676010aeed5d6b2b58e8036","src/swap-simulator/swap-simulator.ts":"48cc4c90a2622d806659fa2f8c4f48d600a2b2db","src/swap-simulator/swap-simulator.types.ts":"2b03d7e389ab8875852330c8fddf5a9bfe96f1c6","src/swap-simulator/utility/cache.util.ts":"c5af86d350610a80a6690846657a35635bbc752a","src/swap-simulator/utility/index.ts":"7272f5d23dfa7af2895fca9bb0b17985234ab6e1","src/swap-simulator/utility/math.util.ts":"96fbe38cbabe344f6f58220f46c20103e6df4225","src/swap-simulator/utility/swap-util.spec.ts":"b7fe082f3fef7e5a912959925924f56f8c36e020","src/swap-simulator/utility/swap.util.ts":"f49236f0d22f72b9283244e870d34401d42fe009","src/swap-simulator/utility/tick.util.ts":"4d9bf8ed782f07587c71009ad13cd249b5e3a840","tsconfig.json":"55467bd5c5eb1b501abe50b952d5f2d9fa0a0d69"},"deps":{}} \ No newline at end of file +{"files":{".vscode":"1700971955685.2515","build":"1701412916671.3086","node_modules":"1700891704503.8325",".eslintignore":"7de3bd702df2dee92c033c49abbedd0b0f7452e6",".eslintrc.js":"ca4815a5cf5cffa1d3fb4a014c8c602f852b002a",".gitignore":"c87c9b392c0200d9c9dafc444386ad3e15a85c64",".prettierignore":"47bb4656eb55860a075be7799cba7fa955b68141",".prettierrc":"fe5f744c7a08b128c935d1e1aed3e8a577e74507","jest.config.json":"2e496ee6bd64eb237161dcd69a6957eff2df584d","package.json":"4dda70ca76fb6022f6cb20852ecd8d2d95d638d2","src/common/array.util.ts":"9482ab121d34cc7e08a0cd33b49173b0b85823d8","src/common/bigint.util.ts":"343f4c85ca1f6c840ade68c259ed82bf5b159fb0","src/common/index.ts":"861a3167cddfc93e9eb1b6a4ae8229bb9dc2f8fd","src/common/mapper.ts":"f7d7b491dff443911a978b34e4cb378bee46c2b7","src/common/queue.ts":"ad096fefbe1c5a7339b536b0b8d39dba661b520e","src/common/test.util.ts":"3e500df6ec27ba98606acbfcaec9243e22862e43","src/constants/index.ts":"9605b149deb525c25f6e93420bbc433ff1c75cd0","src/constants/math.constant.ts":"b617851527cabcc9c3bce2c8e39208001d379ad6","src/constants/swap.constant.ts":"53e280147c68acfba490bc1f9a0b7bb1580e7280","src/index.ts":"691efb21a28bd3f0e6437edcb16192789dbbb7f6","src/swap-router/index.ts":"effaf28a826bdf1441437643e8343e7fbd8026b1","src/swap-router/swap-router-default.spec.ts":"f980bc94753df130c950eb80d8709b62ec3276fa","src/swap-router/swap-router-multi-higher-range-position-pool.spec.ts":"683ce3a82d73e915018e772723700905c3ff7c92","src/swap-router/swap-router-multi-lower-range-position-pool.spec.ts":"93bfd18d0a297f3c66743cddcf2fe10c3764e250","src/swap-router/swap-router-multi-pair-pools.spec.ts":"5fbd55be39012d46adbdc91a1111dca2aafd314d","src/swap-router/swap-router-multi-route.spec.ts":"771df497876b6bc027dc7b65d03e53209538bf2e","src/swap-router/swap-router-single-pair-pools.spec.ts":"3954e9057ef9534a3724dc960c291281d1a4ef52","src/swap-router/swap-router.ts":"606de3d518665d58f5cbafb55f45d92c30dab77d","src/swap-router/swap-router.types.ts":"2a48987217df238256a0721d227952142a37ce08","src/swap-router/utility/index.ts":"4973874904dd9d77d037d72b1ec8aed397716a38","src/swap-router/utility/route.util.ts":"d492418c9184e42d3ef29d7760eb18fa013f54c6","src/swap-simulator/index.ts":"ef493c5977bdf1123d1197b804f2344ee463870c","src/swap-simulator/swap-simulator-default.spec.ts":"867788b12ccc70abe676010aeed5d6b2b58e8036","src/swap-simulator/swap-simulator.ts":"48cc4c90a2622d806659fa2f8c4f48d600a2b2db","src/swap-simulator/swap-simulator.types.ts":"2b03d7e389ab8875852330c8fddf5a9bfe96f1c6","src/swap-simulator/utility/cache.util.ts":"c5af86d350610a80a6690846657a35635bbc752a","src/swap-simulator/utility/index.ts":"7272f5d23dfa7af2895fca9bb0b17985234ab6e1","src/swap-simulator/utility/math.util.ts":"96fbe38cbabe344f6f58220f46c20103e6df4225","src/swap-simulator/utility/swap-util.spec.ts":"b7fe082f3fef7e5a912959925924f56f8c36e020","src/swap-simulator/utility/swap.util.ts":"f49236f0d22f72b9283244e870d34401d42fe009","src/swap-simulator/utility/tick.util.ts":"4d9bf8ed782f07587c71009ad13cd249b5e3a840","tsconfig.json":"55467bd5c5eb1b501abe50b952d5f2d9fa0a0d69"},"deps":{}} \ No newline at end of file diff --git a/packages/web/src/components/common/pool-graph/PoolGraph.stories.tsx b/packages/web/src/components/common/pool-graph/PoolGraph.stories.tsx index 0bc206a11..f1d55aa60 100644 --- a/packages/web/src/components/common/pool-graph/PoolGraph.stories.tsx +++ b/packages/web/src/components/common/pool-graph/PoolGraph.stories.tsx @@ -1,8 +1,9 @@ import PoolGraph, { type PoolGraphProps } from "./PoolGraph"; import { Meta, StoryObj } from "@storybook/react"; import POOLS from "@repositories/pool/mock/pools.json"; +import { PoolModel } from "@models/pool/pool-model"; -const pool = POOLS.pools[0]; +const pool = POOLS.pools[0] as PoolModel; export default { title: "common/PoolGraph", diff --git a/packages/web/src/components/common/pool-selection-graph/PoolSelectionGraph.stories.tsx b/packages/web/src/components/common/pool-selection-graph/PoolSelectionGraph.stories.tsx index 32e9f8d01..50cf48d18 100644 --- a/packages/web/src/components/common/pool-selection-graph/PoolSelectionGraph.stories.tsx +++ b/packages/web/src/components/common/pool-selection-graph/PoolSelectionGraph.stories.tsx @@ -3,6 +3,7 @@ import PoolSelectionGraph, { type PoolSelectionGraphProps } from "./PoolSelectio import { ComponentStory, Meta, StoryObj } from "@storybook/react"; import POOLS from "@repositories/pool/mock/pools.json"; import { tickToPrice } from "@utils/swap-utils"; +import { PoolModel } from "@models/pool/pool-model"; const test = [ @@ -1832,7 +1833,7 @@ const test = [ } ]; -const pool = POOLS.pools[0]; +const pool = POOLS.pools[0] as PoolModel; export default { title: "common/PoolSelectionGraph", diff --git a/packages/web/src/components/earn/earn-incentivized-pools/EarnIncentivizedPools.stories.tsx b/packages/web/src/components/earn/earn-incentivized-pools/EarnIncentivizedPools.stories.tsx index db334c1d4..1e9a2655e 100644 --- a/packages/web/src/components/earn/earn-incentivized-pools/EarnIncentivizedPools.stories.tsx +++ b/packages/web/src/components/earn/earn-incentivized-pools/EarnIncentivizedPools.stories.tsx @@ -4,8 +4,9 @@ import IncentivizedPoolCardList from "../incentivized-pool-card-list/Incentivize import POOLS from "@repositories/pool/mock/pools.json"; import { PoolMapper } from "@models/pool/mapper/pool-mapper"; import { action } from "@storybook/addon-actions"; +import { PoolModel } from "@models/pool/pool-model"; -const pool = POOLS.pools[0]; +const pool = POOLS.pools[0] as PoolModel; const cardInfo = PoolMapper.toCardInfo(pool); diff --git a/packages/web/src/components/earn/incentivized-pool-card-list/IncentivizedPoolCardList.stories.tsx b/packages/web/src/components/earn/incentivized-pool-card-list/IncentivizedPoolCardList.stories.tsx index 5403af7b5..11c6104be 100644 --- a/packages/web/src/components/earn/incentivized-pool-card-list/IncentivizedPoolCardList.stories.tsx +++ b/packages/web/src/components/earn/incentivized-pool-card-list/IncentivizedPoolCardList.stories.tsx @@ -5,8 +5,9 @@ import IncentivizedPoolCardList from "./IncentivizedPoolCardList"; import { action } from "@storybook/addon-actions"; import POOLS from "@repositories/pool/mock/pools.json"; import { PoolMapper } from "@models/pool/mapper/pool-mapper"; +import { PoolModel } from "@models/pool/pool-model"; -const pool = POOLS.pools[0]; +const pool = POOLS.pools[0] as PoolModel; const cardInfo = PoolMapper.toCardInfo(pool); diff --git a/packages/web/src/components/earn/incentivized-pool-card/IncentivizedPoolCard.stories.tsx b/packages/web/src/components/earn/incentivized-pool-card/IncentivizedPoolCard.stories.tsx index f2e446163..eb59f44fc 100644 --- a/packages/web/src/components/earn/incentivized-pool-card/IncentivizedPoolCard.stories.tsx +++ b/packages/web/src/components/earn/incentivized-pool-card/IncentivizedPoolCard.stories.tsx @@ -5,8 +5,9 @@ import IncentivizedPoolCard from "./IncentivizedPoolCard"; import { action } from "@storybook/addon-actions"; import POOLS from "@repositories/pool/mock/pools.json"; import { PoolMapper } from "@models/pool/mapper/pool-mapper"; +import { PoolModel } from "@models/pool/pool-model"; -const pool = POOLS.pools[0]; +const pool = POOLS.pools[0] as PoolModel; const cardInfo = PoolMapper.toCardInfo(pool); diff --git a/packages/web/src/components/earn/pool-info/PoolInfo.stories.tsx b/packages/web/src/components/earn/pool-info/PoolInfo.stories.tsx index 1038c7854..393c631e6 100644 --- a/packages/web/src/components/earn/pool-info/PoolInfo.stories.tsx +++ b/packages/web/src/components/earn/pool-info/PoolInfo.stories.tsx @@ -51,7 +51,7 @@ const pool: PoolCardInfo = { amount: 10 } ], - incentiveType: "Incentivized", + incentivizedType: "INCENTIVIZED", currentTick: 0, price: 0, bins: [] diff --git a/packages/web/src/components/earn/pool-list-table/PoolListTable.stories.tsx b/packages/web/src/components/earn/pool-list-table/PoolListTable.stories.tsx index e6c669247..ae7d92e21 100644 --- a/packages/web/src/components/earn/pool-list-table/PoolListTable.stories.tsx +++ b/packages/web/src/components/earn/pool-list-table/PoolListTable.stories.tsx @@ -5,8 +5,9 @@ import PoolListTable from "./PoolListTable"; import { action } from "@storybook/addon-actions"; import POOLS from "@repositories/pool/mock/pools.json"; import { PoolMapper } from "@models/pool/mapper/pool-mapper"; +import { PoolModel } from "@models/pool/pool-model"; -const pool = POOLS.pools[0]; +const pool = POOLS.pools[0] as PoolModel; const listInfo = PoolMapper.toListInfo(pool); diff --git a/packages/web/src/containers/pool-add-incentivize-container/PoolAddIncentivizeContainer.tsx b/packages/web/src/containers/pool-add-incentivize-container/PoolAddIncentivizeContainer.tsx index a19fcc1e9..58c86e23f 100644 --- a/packages/web/src/containers/pool-add-incentivize-container/PoolAddIncentivizeContainer.tsx +++ b/packages/web/src/containers/pool-add-incentivize-container/PoolAddIncentivizeContainer.tsx @@ -16,7 +16,7 @@ import { useWallet } from "@hooks/wallet/use-wallet"; export const dummyDisclaimer = "This feature enables you to provide incentives as staking rewards for a specific liquidity pool. Before you proceed, ensure that you understand the mechanics of external incentives and acknowledge that you cannot withdraw the rewards once you complete this step.

The incentives you add will be automatically distributed by the contract and may draw more liquidity providers."; -const pools: PoolModel[] = POOLS.pools; +const pools = POOLS.pools as PoolModel[]; const tokenBalances: TokenBalanceInfo[] = []; const periods = [90, 180, 365]; @@ -34,7 +34,7 @@ const PoolAddIncentivizeContainer: React.FC = () => { const [token, setToken] = useState(null); const tokenAmountInput = useTokenAmountInput(token); const { updateTokenPrices } = useTokenData(); - + useEffect(() => { setPool(pools[0]); }, []); @@ -54,7 +54,7 @@ const PoolAddIncentivizeContainer: React.FC = () => { }, []); useEffect(() => { - setPoolDetail(PoolDetailData.pool); + setPoolDetail(PoolDetailData.pool as PoolDetailModel); }, []); const selectPool = useCallback((poolId: string) => { @@ -63,7 +63,7 @@ const PoolAddIncentivizeContainer: React.FC = () => { setCurrentPool(pool); } }, [setCurrentPool]); - + const selectToken = useCallback((path: string) => { const token = tokenBalances.find(token => token.path === path); if (token) { diff --git a/packages/web/src/containers/pool-incentivize-container/PoolIncentivizeContainer.tsx b/packages/web/src/containers/pool-incentivize-container/PoolIncentivizeContainer.tsx index 82873c2e1..8e2ea194e 100644 --- a/packages/web/src/containers/pool-incentivize-container/PoolIncentivizeContainer.tsx +++ b/packages/web/src/containers/pool-incentivize-container/PoolIncentivizeContainer.tsx @@ -16,7 +16,7 @@ import { useWallet } from "@hooks/wallet/use-wallet"; export const dummyDisclaimer = "This feature enables you to provide incentives as staking rewards for a specific liquidity pool. Before you proceed, ensure that you understand the mechanics of external incentives and acknowledge that you cannot withdraw the rewards once you complete this step.

The incentives you add will be automatically distributed by the contract and may draw more liquidity providers."; -const pools: PoolModel[] = POOLS.pools; +const pools: PoolModel[] = POOLS.pools as PoolModel[]; const tokenBalances: TokenBalanceInfo[] = []; const periods = [90, 180, 365]; @@ -33,7 +33,7 @@ const PoolIncentivizeContainer: React.FC = () => { const [token, setToken] = useState(null); const tokenAmountInput = useTokenAmountInput(token); const { updateTokenPrices } = useTokenData(); - + useEffect(() => { setDataModal(tokenAmountInput); }, [tokenAmountInput.amount, token]); @@ -50,7 +50,7 @@ const PoolIncentivizeContainer: React.FC = () => { }, []); useEffect(() => { - setPoolDetail(PoolDetailData.pool); + setPoolDetail(PoolDetailData.pool as PoolDetailModel); }, []); const selectPool = useCallback((poolId: string) => { @@ -59,7 +59,7 @@ const PoolIncentivizeContainer: React.FC = () => { setCurrentPool(pool); } }, [setCurrentPool]); - + const selectToken = useCallback((path: string) => { const token = tokenBalances.find(token => token.path === path); if (token) { diff --git a/packages/web/src/containers/pool-list-container/PoolListContainer.tsx b/packages/web/src/containers/pool-list-container/PoolListContainer.tsx index 85443151a..fe116a766 100644 --- a/packages/web/src/containers/pool-list-container/PoolListContainer.tsx +++ b/packages/web/src/containers/pool-list-container/PoolListContainer.tsx @@ -1,5 +1,5 @@ import React, { useCallback, useEffect, useMemo, useState } from "react"; -import { type FeeOptions } from "@common/values/data-constant"; +import { IncentivizedOptions, type FeeOptions } from "@common/values/data-constant"; import PoolList from "@components/earn/pool-list/PoolList"; import { type TokenPairInfo } from "@models/token/token-pair-info"; import { ValuesType } from "utility-types"; @@ -50,34 +50,6 @@ export const POOL_TYPE = { export type POOL_TYPE = ValuesType; -// const SORT_PARAMS: { [key in TABLE_HEAD]: string } = { -// "Pool Name": "name", -// Liquidity: "liquidity", -// "Volume (24h)": "volume", -// "Fees (24h)": "fees", -// APR: "apr", -// Rewards: "rewards", -// "Liquidity Plot": "liquidity_plot", -// }; - -// async function fetchPools( -// type: POOL_TYPE, // eslint-disable-line -// page: number, // eslint-disable-line -// keyword: string, // eslint-disable-line -// sortKey?: string, // eslint-disable-line -// direction?: string, // eslint-disable-line -// ): Promise { -// return new Promise(resolve => setTimeout(resolve, 2000)).then(() => -// Promise.resolve([ -// ...dummyPoolList, -// ...dummyPoolList, -// ...dummyPoolList, -// ...dummyPoolList, -// ...dummyPoolList, -// ]), -// ); -// } - const PoolListContainer: React.FC = () => { const [poolType, setPoolType] = useState(POOL_TYPE.ALL); const [page, setPage] = useState(0); @@ -104,19 +76,29 @@ const PoolListContainer: React.FC = () => { }, [isClickOutside, keyword]); const sortedPoolListInfos = useMemo(() => { - return poolListInfos.filter(info => { - if (poolType !== "All") { - return info.incentiveType === poolType; + function filteredPoolType(poolType: POOL_TYPE, incentivizedType: IncentivizedOptions) { + switch (poolType) { + case "Incentivized": + return incentivizedType !== "INCENTIVIZED"; + case "Non-Incentivized": + return incentivizedType === "NON_INCENTIVIZED"; + default: + break; } + return true; + } + + return poolListInfos.filter(info => { if (keyword !== "") { return info.tokenA.name.toLowerCase().includes(keyword.toLowerCase()) || info.tokenB.name.toLowerCase().includes(keyword.toLowerCase()) || info.tokenA.symbol.toLowerCase().includes(keyword.toLowerCase()) || info.tokenB.symbol.toLowerCase().includes(keyword.toLowerCase()); } - return true; + + return filteredPoolType(poolType, info.incentivizedType); }); - }, [keyword, poolListInfos, poolType, sortOption]); + }, [keyword, poolListInfos, poolType]); const totalPage = useMemo(() => { return Math.floor(sortedPoolListInfos.length / 20) + 1; @@ -176,7 +158,7 @@ const PoolListContainer: React.FC = () => { const disableItems = ["Rewards", "Liquidity Plot"]; return !disableItems.includes(head); }, []); - + return ( { ...MOCK_DATA, lpRewardId: (Number(MOCK_DATA.lpRewardId) + item).toString(), position: item > 2 ? { ...MOCK_DATA.position, balance: 0 } : MOCK_DATA.position, - }; + } as LPPositionModel; }); const RemoveLiquidityContainer: React.FC = () => { diff --git a/packages/web/src/repositories/pool/mock/pools.json b/packages/web/src/repositories/pool/mock/pools.json index f0315779e..e8b5dd061 100644 --- a/packages/web/src/repositories/pool/mock/pools.json +++ b/packages/web/src/repositories/pool/mock/pools.json @@ -28,6 +28,7 @@ "logoURI": "https://s2.coinmarketcap.com/static/img/coins/64x64/5994.png", "priceId": "gno.land/r/foo" }, + "incentivizedType": "INCENTIVIZED", "tvl": 1182782.0, "tvlChange": 118278200.0, "volume": 1182797.0, diff --git a/packages/web/src/repositories/pool/response/pool-list-rpc-response.ts b/packages/web/src/repositories/pool/response/pool-list-rpc-response.ts index 706ee7fde..af6bfdc01 100644 --- a/packages/web/src/repositories/pool/response/pool-list-rpc-response.ts +++ b/packages/web/src/repositories/pool/response/pool-list-rpc-response.ts @@ -1,4 +1,4 @@ -import { PoolRPCResponse } from "./pool-info-response"; +import { PoolRPCResponse } from "./pool-rpc-response"; export interface PoolListRPCResponse { stat: { diff --git a/packages/web/src/utils/swap-utils.spec.ts b/packages/web/src/utils/swap-utils.spec.ts index dd6027c18..eb9545eed 100644 --- a/packages/web/src/utils/swap-utils.spec.ts +++ b/packages/web/src/utils/swap-utils.spec.ts @@ -8,20 +8,19 @@ describe("tick convert to price", () => { expect(tickToPrice(tick)).toBe(1); }); - test("10000 to 1.6486800559310761", () => { + test("10000 to 1.6486800559311758", () => { const tick = 10000; - expect(tickToPrice(tick)).toBe(1.6486800559310761); + expect(tickToPrice(tick)).toBe(1.6486800559311758); }); - test("10001 to 1.6487624878731255", () => { + test("10001 to 1.6487624878732252", () => { const tick = 10001; - expect(tickToPrice(tick)).toBe(1.6487624878731255); + expect(tickToPrice(tick)).toBe(1.6487624878732252); }); - test("100000 to 148.37606292298494", () => { + test("100000 to 148.3760629230746", () => { const tick = 100000; - console.log(tickToPrice(tick)); - expect(tickToPrice(tick)).toBe(148.37606292298494); + expect(tickToPrice(tick)).toBe(148.3760629230746); }); }); @@ -33,20 +32,20 @@ describe("tick convert to sqrtPriceX96", () => { ); }); - test("10000 to 1.6486800559310761", () => { + test("10000 to 1.6486800559311758", () => { const tick = 10000; - expect(tickToPrice(tick)).toBe(1.6486800559310761); + expect(tickToPrice(tick)).toBe(1.6486800559311758); }); - test("10001 to 1.6487624878731255", () => { + test("10001 to 1.6487624878732252", () => { const tick = 10001; - expect(tickToPrice(tick)).toBe(1.6487624878731255); + expect(tickToPrice(tick)).toBe(1.6487624878732252); }); - test("100000 to 148.37606292298494", () => { + test("100000 to 148.3760629230746", () => { const tick = 100000; console.log(tickToPrice(tick)); - expect(tickToPrice(tick)).toBe(148.37606292298494); + expect(tickToPrice(tick)).toBe(148.3760629230746); }); test("100000 to 148.3760629230746", () => {