diff --git a/src/typescript/frontend/src/components/pages/launch-emojicoin/ClientLaunchEmojicoinPage.tsx b/src/typescript/frontend/src/components/pages/launch-emojicoin/ClientLaunchEmojicoinPage.tsx index 0eb3c9fb62..1c8b1469c8 100644 --- a/src/typescript/frontend/src/components/pages/launch-emojicoin/ClientLaunchEmojicoinPage.tsx +++ b/src/typescript/frontend/src/components/pages/launch-emojicoin/ClientLaunchEmojicoinPage.tsx @@ -6,8 +6,6 @@ import { startTransition, useCallback, useEffect, useRef, useState } from "react import { useSearchParams } from "next/navigation"; import { getEmojisInString } from "@sdk/emoji_data"; import { useAptos } from "context/wallet-context/AptosContextProvider"; -import { revalidateTagAction } from "lib/queries/cache-utils/revalidate"; -import { TAGS } from "lib/queries/cache-utils/tags"; import { ROUTES } from "router/routes"; import { useRouter } from "next/navigation"; import path from "path"; @@ -69,14 +67,6 @@ const ClientLaunchEmojicoinPage = () => { const handleLoading = useCallback(async () => { const marketRegistrationEvent = lastResponse.current; if (marketRegistrationEvent) { - // NOTE: revalidateTagAction may cause a flicker in the loading animation because the server - // rerenders and sends the RSC components again. To avoid this we'll probably need to finish the animation - // orchestration with a different animation or cover it up somehow, otherwise I'm not sure how to fix it in a - // clean way. - - // Revalidate the registered markets tag. - revalidateTagAction(TAGS.RegisteredMarkets); - startTransition(() => { // Parse the emojis from the market registration event. // We do this in case the emojis are somehow cleared before the response is received. This ensures that diff --git a/src/typescript/frontend/src/context/wallet-context/AptosContextProvider.tsx b/src/typescript/frontend/src/context/wallet-context/AptosContextProvider.tsx index ea1263ce82..c57f82ee2d 100644 --- a/src/typescript/frontend/src/context/wallet-context/AptosContextProvider.tsx +++ b/src/typescript/frontend/src/context/wallet-context/AptosContextProvider.tsx @@ -31,7 +31,7 @@ import { import { useEventStore } from "context/event-store-context"; import { type TypeTagInput } from "@sdk/emojicoin_dot_fun"; import { DEFAULT_TOAST_CONFIG } from "const"; -import { sleep, UnitOfTime } from "@sdk/utils"; +import { sleep } from "@sdk/utils"; import { useWalletBalance } from "lib/hooks/queries/use-wallet-balance"; import { getAptBalanceFromChanges, @@ -217,9 +217,7 @@ export function AptosContextProvider({ children }: PropsWithChildren) { error: null, }); setLastResponseStoredAt(Date.now()); - sleep(DEFAULT_TOAST_CONFIG.autoClose, UnitOfTime.Milliseconds).then(() => { - setStatus("idle"); - }); + sleep(DEFAULT_TOAST_CONFIG.autoClose).then(() => setStatus("idle")); } } catch (e: unknown) { if (e instanceof AptosApiError) { diff --git a/src/typescript/frontend/src/lib/env.ts b/src/typescript/frontend/src/lib/env.ts index 0e0d4efa9a..09bd76eb95 100644 --- a/src/typescript/frontend/src/lib/env.ts +++ b/src/typescript/frontend/src/lib/env.ts @@ -12,9 +12,8 @@ export type Links = { const network = process.env.NEXT_PUBLIC_APTOS_NETWORK; const APTOS_NETWORK = network as Network; -// NOTE: We must check it this way instead of with `NetworkToNetworkName[APTOS_NETWORK]` because -// otherwise the @aptos-labs/ts-sdk package is included in the middleware.ts function and the edge -// runtime won't build properly. +// NOTE: Don't use `NetworkToNetworkName[APTOS_NETWORK]` here or the @aptos-labs/ts-sdk package is +// included in the middleware.ts function in the frontend and the edge runtime won't build properly. if (!["local", "devnet", "testnet", "mainnet", "custom"].includes(APTOS_NETWORK)) { throw new Error(`Invalid network: ${network}`); } diff --git a/src/typescript/frontend/src/lib/hooks/queries/use-grace-period.ts b/src/typescript/frontend/src/lib/hooks/queries/use-grace-period.ts index 344fb4dd80..f71021368d 100644 --- a/src/typescript/frontend/src/lib/hooks/queries/use-grace-period.ts +++ b/src/typescript/frontend/src/lib/hooks/queries/use-grace-period.ts @@ -6,9 +6,7 @@ import { useAptos } from "context/wallet-context/AptosContextProvider"; import { useEffect, useMemo, useState } from "react"; // ------------------------------------------------------------------------------------------------- -// // Utilities for calculating the number of seconds left. -// // ------------------------------------------------------------------------------------------------- const nowSeconds = () => Math.floor(new Date().getTime() / 1000); @@ -26,9 +24,7 @@ const formattedTimeLeft = (secondsRemaining: number) => { }; // ------------------------------------------------------------------------------------------------- -// // Hook to force the component to re-render on an interval basis. -// // ------------------------------------------------------------------------------------------------- const useDisplayTimeLeft = (marketRegistrationTime?: bigint) => { const [timeLeft, setTimeLeft] = useState>(); @@ -51,9 +47,7 @@ const useDisplayTimeLeft = (marketRegistrationTime?: bigint) => { }; // ------------------------------------------------------------------------------------------------- -// // `useQuery` hook that fetches the grace period status on an interval basis. -// // ------------------------------------------------------------------------------------------------- const useGracePeriod = (symbol: string, hasSwaps: boolean) => { const { aptos } = useAptos(); @@ -80,9 +74,7 @@ const useGracePeriod = (symbol: string, hasSwaps: boolean) => { }; // ------------------------------------------------------------------------------------------------- -// // The actual hook to be used in a component to display the amount of seconds left. -// // ------------------------------------------------------------------------------------------------- export const useCanTradeMarket = (symbol: string) => { const { account } = useAptos(); diff --git a/src/typescript/frontend/src/lib/queries/cache-utils/cached.ts b/src/typescript/frontend/src/lib/queries/cache-utils/cached.ts deleted file mode 100644 index 9e8e817eb5..0000000000 --- a/src/typescript/frontend/src/lib/queries/cache-utils/cached.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { unstable_cache } from "next/cache"; - -export const cached = unstable_cache; -export default cached; diff --git a/src/typescript/frontend/src/lib/queries/cache-utils/revalidate.ts b/src/typescript/frontend/src/lib/queries/cache-utils/revalidate.ts deleted file mode 100644 index d5b241e1b7..0000000000 --- a/src/typescript/frontend/src/lib/queries/cache-utils/revalidate.ts +++ /dev/null @@ -1,8 +0,0 @@ -"use server"; - -import { revalidateTag } from "next/cache"; -import { type TAGS } from "./tags"; - -export const revalidateTagAction = async (tag: TAGS) => { - revalidateTag(tag); -}; diff --git a/src/typescript/frontend/src/lib/queries/cache-utils/tags.ts b/src/typescript/frontend/src/lib/queries/cache-utils/tags.ts deleted file mode 100644 index 576b2a2ac8..0000000000 --- a/src/typescript/frontend/src/lib/queries/cache-utils/tags.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Revalidation tags. - */ -export enum TAGS { - RegisteredMarkets = "registered-markets", - SortedMarkets = "sorted-markets", - FeaturedMarket = "featured-market", -} diff --git a/src/typescript/frontend/src/lib/queries/graphql/README.md b/src/typescript/frontend/src/lib/queries/graphql/README.md deleted file mode 100644 index 5808e1c6f3..0000000000 --- a/src/typescript/frontend/src/lib/queries/graphql/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Fallback graphql queries - -In case our indexer isn't working or is down, we provide fallback queries -using the GraphQL endpoint. - -This endpoint is automatically resolved based on the network type, relying on -the Aptos Labs hosted GraphQL endpoints or the local endpoint if running on -localhost. diff --git a/src/typescript/frontend/src/lib/queries/initial/cache-helper.ts b/src/typescript/frontend/src/lib/queries/initial/cache-helper.ts deleted file mode 100644 index a99e8f888a..0000000000 --- a/src/typescript/frontend/src/lib/queries/initial/cache-helper.ts +++ /dev/null @@ -1,27 +0,0 @@ -"use server"; - -import { UnitOfTime, getTime } from "@sdk/utils/misc"; -import { cache } from "react"; - -/** - * A helper function to either cache data or fetch it from a static source, because the production - * endpoint is not set up yet. - */ -export const fetchInitialWithFallback = async ({ - functionArgs, - queryFunction, -}: { - functionArgs: T2; - queryFunction: (args: T2) => Promise; -}) => { - const currentMinute = Math.floor(getTime(UnitOfTime.Minutes)); - const cachedFunction = cache( - async (args: { time: number; functionArgs: T2 }) => await queryFunction(args.functionArgs) - ); - return await cachedFunction({ - time: currentMinute, - functionArgs, - }); -}; - -export default fetchInitialWithFallback; diff --git a/src/typescript/frontend/src/lib/queries/sorting/types.ts b/src/typescript/frontend/src/lib/queries/sorting/types.ts index 29c2d822e5..bec969da14 100644 --- a/src/typescript/frontend/src/lib/queries/sorting/types.ts +++ b/src/typescript/frontend/src/lib/queries/sorting/types.ts @@ -1,6 +1,4 @@ import { DEFAULT_SORT_BY, SortMarketsBy } from "@sdk/indexer-v2/types/common"; -import { type ORDER_BY } from "@sdk/queries/const"; -import { type ValueOf } from "@sdk/utils/utility-types"; export type MarketDataSortByHomePage = | SortMarketsBy.MarketCap @@ -8,23 +6,6 @@ export type MarketDataSortByHomePage = | SortMarketsBy.DailyVolume | SortMarketsBy.AllTimeVolume; -export type GetSortedMarketDataQueryArgs = { - limit?: number; - page: number; - orderBy: ValueOf; - sortBy: SortMarketsBy | SortByPostgrestQueryParams; - inBondingCurve?: boolean; - exactCount?: boolean; - searchBytes?: string; -}; - -export type GetMySortedMarketDataQueryArgs = Omit< - GetSortedMarketDataQueryArgs, - "exactCount" | "inBondingCurve" -> & { - account?: string; -}; - export const sortByFilters = { [SortMarketsBy.MarketCap]: { forPageQueryParams: "market_cap", @@ -73,18 +54,6 @@ export type SortByPostgrestQueryParams = | "one_day_tvl_per_lp_coin_growth_q64" | "cpamm_real_reserves_quote"; -export const toPageQueryParam = ( - sortBy: SortByPostgrestQueryParams | SortMarketsBy | SortByPageQueryParams -): SortByPageQueryParams => { - return sortByFilters[sortBy].forPageQueryParams ?? sortBy; -}; - -export const toPostgrestQueryParam = ( - sortBy: SortByPageQueryParams | SortMarketsBy | SortByPostgrestQueryParams -): SortByPostgrestQueryParams => { - return sortByFilters[sortBy]?.forPostgrestQuery ?? sortBy; -}; - export const toMarketDataSortBy = ( sortBy?: SortByPostgrestQueryParams | SortMarketsBy | SortByPageQueryParams ): SortMarketsBy => { diff --git a/src/typescript/frontend/src/lib/store/market-data.ts b/src/typescript/frontend/src/lib/store/market-data.ts deleted file mode 100644 index 1be7975a2f..0000000000 --- a/src/typescript/frontend/src/lib/store/market-data.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { createStore } from "zustand/vanilla"; -import { immer } from "zustand/middleware/immer"; - -export type MarketDataState = { - numMarkets: number; -}; - -export type MarketDataActions = { - setNumMarkets: (numMarkets: number) => void; -}; - -export type MarketDataStore = MarketDataState & MarketDataActions; - -export const createMarketDataStore = (initial?: MarketDataStore) => { - return createStore()( - immer((set) => ({ - numMarkets: initial?.numMarkets ?? 0, - setNumMarkets: (numMarkets: number) => - set((state) => { - state.numMarkets = numMarkets; - }), - })) - ); -}; diff --git a/src/typescript/frontend/src/lib/utils/prettify-emoji-name.ts b/src/typescript/frontend/src/lib/utils/prettify-emoji-name.ts deleted file mode 100644 index 2f0822126c..0000000000 --- a/src/typescript/frontend/src/lib/utils/prettify-emoji-name.ts +++ /dev/null @@ -1,6 +0,0 @@ -export const prettifyEmojiName = (name: string) => { - return name - .replace(/: (light|medium-light|medium|medium-dark|dark|) skin tone/g, "") - .replace(/, beard/g, ": beard") - .replace(/flag: /g, ""); -}; diff --git a/src/typescript/sdk/src/indexer-v2/queries/utils.ts b/src/typescript/sdk/src/indexer-v2/queries/utils.ts index 5a2212df40..cc5004f610 100644 --- a/src/typescript/sdk/src/indexer-v2/queries/utils.ts +++ b/src/typescript/sdk/src/indexer-v2/queries/utils.ts @@ -9,10 +9,8 @@ import { type PostgrestBuilder, type PostgrestTransformBuilder, } from "@supabase/postgrest-js"; -import { type Account, type AccountAddressInput } from "@aptos-labs/ts-sdk"; import { type AnyNumberString } from "../../types/types"; import { type DatabaseJsonType, postgresTimestampToDate, TableName } from "../types/json-types"; -import { toAccountAddress } from "../../utils"; import { postgrest } from "./client"; import { type DatabaseModels } from "../types"; @@ -203,17 +201,3 @@ export function queryHelperWithCount< return query; } - -/** - * Strip leading zeroes from an address. - * - * @param address either the account object, an account address, or a string. - * @returns the address without any leading zeroes, still prefixed with "0x". - * - */ -/* eslint-disable-next-line import/no-unused-modules */ -export const stripLeadingZeroes = (address: T | AccountAddressInput) => - // prettier-ignore - toAccountAddress(address) - .toString() - .replace(/^0x0+/, "0x"); diff --git a/src/typescript/sdk/src/queries/client-utils/candlestick.ts b/src/typescript/sdk/src/queries/client-utils/candlestick.ts deleted file mode 100644 index e638bdb057..0000000000 --- a/src/typescript/sdk/src/queries/client-utils/candlestick.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* eslint-disable import/no-unused-modules */ // Still this bug where it thinks this doesn't export. -import { PeriodDuration } from "../../const"; -import { type Types } from "../../types"; - -/** - * Tip: Use the PeriodDuration enum to access the keys of an object of this type. - * - * @example - * const candlesticks = await getInitialCandlesticks(marketID); - * const oneDayCandlesticks = candlesticks[PeriodDuration.PERIOD_1D]; - * const oneHourCandlesticks = candlesticks[PeriodDuration.PERIOD_1H]; - * const oneMinuteCandlesticks = candlesticks[PeriodDuration.PERIOD_1M]; - */ -export type GroupedPeriodicStateEvents = Record; - -export const createEmptyGroupedCandlesticks = (): GroupedPeriodicStateEvents => ({ - [PeriodDuration.PERIOD_1M]: [], - [PeriodDuration.PERIOD_5M]: [], - [PeriodDuration.PERIOD_15M]: [], - [PeriodDuration.PERIOD_30M]: [], - [PeriodDuration.PERIOD_1H]: [], - [PeriodDuration.PERIOD_4H]: [], - [PeriodDuration.PERIOD_1D]: [], -}); - -// TODO: Put this in the event store...? -/** - * @see {@link GroupedPeriodicStateEvents} - */ -export const toGroupedCandlesticks = (candlesticks: Types["PeriodicStateEvent"][]) => { - const grouped = createEmptyGroupedCandlesticks(); - - for (const candlestick of candlesticks) { - const periodInEvent = Number(candlestick.periodicStateMetadata.period) as PeriodDuration; - grouped[periodInEvent].push(candlestick); - } - - return grouped; -}; diff --git a/src/typescript/sdk/src/queries/const.ts b/src/typescript/sdk/src/queries/const.ts index aec5616fc2..32db155d5b 100644 --- a/src/typescript/sdk/src/queries/const.ts +++ b/src/typescript/sdk/src/queries/const.ts @@ -23,17 +23,3 @@ export const toOrderBy = (input: OrderByStrings | OrderBy) => { throw new Error(`Invalid order by value: ${input}`); } }; - -export const toOrderByString = (input: OrderByStrings | OrderBy): OrderByStrings => { - if (typeof input === "string") { - return input; - } - switch (input) { - case ORDER_BY.ASC: - return "asc"; - case ORDER_BY.DESC: - return "desc"; - default: - return "desc"; - } -}; diff --git a/src/typescript/sdk/src/utils/aptos-utils.ts b/src/typescript/sdk/src/utils/aptos-utils.ts index 5995b617f8..befdd44fe2 100644 --- a/src/typescript/sdk/src/utils/aptos-utils.ts +++ b/src/typescript/sdk/src/utils/aptos-utils.ts @@ -10,10 +10,6 @@ import { } from "@aptos-labs/ts-sdk"; import { sha3_256 } from "@noble/hashes/sha3"; -export function toAptos(aptos: Aptos | AptosConfig): Aptos { - return aptos instanceof Aptos ? aptos : new Aptos(aptos); -} - export function toConfig(aptos: Aptos | AptosConfig): AptosConfig { return aptos instanceof Aptos ? aptos.config : aptos; } diff --git a/src/typescript/sdk/src/utils/misc.ts b/src/typescript/sdk/src/utils/misc.ts index 25f94bc4b7..dc96799fa4 100644 --- a/src/typescript/sdk/src/utils/misc.ts +++ b/src/typescript/sdk/src/utils/misc.ts @@ -14,69 +14,18 @@ import { isSwapEvent, } from "../types"; -// No nanoseconds because dealing with overflow is a pain (aka using a bigint) and we don't need it. -export enum UnitOfTime { - Microseconds, - Milliseconds, - Seconds, - Minutes, - Hours, - Days, - Weeks, -} - -// No nanoseconds because dealing with overflow is a pain (aka using a bigint) and we don't need it. -// NOTE: This specifically for converting from a UnitOfTime to milliseconds. -export const UNIT_OF_TIME_MULTIPLIERS: Record = { - [UnitOfTime.Microseconds]: 1 / 1000, - [UnitOfTime.Milliseconds]: 1, - [UnitOfTime.Seconds]: 1000, - [UnitOfTime.Minutes]: 1000 * 60, - [UnitOfTime.Hours]: 1000 * 60 * 60, - [UnitOfTime.Days]: 1000 * 60 * 60 * 24, - [UnitOfTime.Weeks]: 1000 * 60 * 60 * 24 * 7, -}; - /** - * Sleep the current thread for the given amount of time, with an optional specifier - * for the unit of time. + * Sleep for a given amount of time. * - * - * @param amount the numeric amount of time to sleep - * @param unitOfTime the unit of time to sleep for - * @default unitOfTime milliseconds. + * @param amount the numeric amount of time to sleep in milliseconds. * */ -export async function sleep( - amount: number, - unitOfTime: UnitOfTime = UnitOfTime.Milliseconds -): Promise { +export async function sleep(amount: number): Promise { return new Promise((resolve) => { - setTimeout(resolve, amount * UNIT_OF_TIME_MULTIPLIERS[unitOfTime]); + setTimeout(resolve, amount); }); } -/** - * - * This is a helper function to specify the unit of time for `Date.now()`. - * - * Note that this function returns a fractional, floating point value. - * - * @param unitOfTime {@link UnitOfTime} - * @returns the elapsed {@link UnitOfTime} since the Unix epoch, as a floating point number. - * - * @example - * ``` - * const time = getTime(UnitOfTime.Seconds); - * // `time` is the number of seconds since the Unix epoch. - * const time = getTime(UnitOfTime.Days); - * // `time` is the number of days since the Unix epoch. - * ``` - */ -export function getTime(unitOfTime: UnitOfTime) { - return Date.now() / UNIT_OF_TIME_MULTIPLIERS[unitOfTime]; -} - /** * This function calculates the period boundary for a swap or state event. * @param event diff --git a/src/typescript/sdk/tests/e2e/queries/sorted/sort-queries.test.ts b/src/typescript/sdk/tests/e2e/queries/sorted/sort-queries.test.ts index fccd8ccf96..527de36c30 100644 --- a/src/typescript/sdk/tests/e2e/queries/sorted/sort-queries.test.ts +++ b/src/typescript/sdk/tests/e2e/queries/sorted/sort-queries.test.ts @@ -7,7 +7,6 @@ import { sleep, SYMBOL_EMOJI_DATA, type SymbolEmojiName, - UnitOfTime, } from "../../../../src"; import TestHelpers from "../../../utils/helpers"; import { getFundedAccounts } from "../../../utils/test-accounts"; @@ -66,7 +65,7 @@ describe("sorting queries for the sort filters on the home page", () => { }); // Sleep in reverse order to mix up the bump order of the markets so it doesn't match // the volume queries, since the inputAmounts are in order according to the index `i`. - await sleep(marketEmojiNames.length - i, UnitOfTime.Seconds); + await sleep((marketEmojiNames.length - i) * 1000); const swap = Swap.submit({ aptosConfig: aptos.config, swapper: registrants[i], diff --git a/src/typescript/sdk/tests/unit/sleep.test.ts b/src/typescript/sdk/tests/unit/sleep.test.ts deleted file mode 100644 index 8066adee47..0000000000 --- a/src/typescript/sdk/tests/unit/sleep.test.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { getTime, sleep, UNIT_OF_TIME_MULTIPLIERS, UnitOfTime } from "../../src"; - -jest.retryTimes(3); - -describe("sleep utility function with units of time", () => { - it("converts units of time to milliseconds", () => { - expect(UNIT_OF_TIME_MULTIPLIERS[UnitOfTime.Microseconds]).toEqual(0.001); - expect(UNIT_OF_TIME_MULTIPLIERS[UnitOfTime.Milliseconds]).toEqual(1); - expect(UNIT_OF_TIME_MULTIPLIERS[UnitOfTime.Seconds]).toBeCloseTo(1000, 1); - expect(UNIT_OF_TIME_MULTIPLIERS[UnitOfTime.Minutes]).toBeCloseTo(1000 * 60, 1); - expect(UNIT_OF_TIME_MULTIPLIERS[UnitOfTime.Hours]).toBeCloseTo(1000 * 60 * 60, 1); - expect(UNIT_OF_TIME_MULTIPLIERS[UnitOfTime.Days]).toBeCloseTo(1000 * 60 * 60 * 24, 1); - expect(UNIT_OF_TIME_MULTIPLIERS[UnitOfTime.Weeks]).toBeCloseTo(1000 * 60 * 60 * 24 * 7, 1); - }); - - it("sleeps one tenth of a second for each unit of time", async () => { - const inputs = [ - [UnitOfTime.Microseconds, 100_000], - [UnitOfTime.Milliseconds, 100], - [UnitOfTime.Seconds, 0.1], - [UnitOfTime.Minutes, 0.1 / 60], - [UnitOfTime.Hours, 0.1 / (60 * 60)], - [UnitOfTime.Days, 0.1 / (60 * 60 * 24)], - [UnitOfTime.Weeks, 0.1 / (60 * 60 * 24 * 7)], - ] as const; - - // Note that jest screws up the `startTime` values if you don't index each start time. - const startTimes = Array.from({ length: inputs.length }, () => 0); - const results = inputs.map(async ([unit, amt], i) => { - startTimes[i] = Date.now(); - return sleep(amt, unit).then(() => { - const endTime = Date.now(); - return endTime - startTimes[i]; - }); - }); - const res = await Promise.all(results); - res.forEach((r) => { - // The difference between end time and start time should be 100 milliseconds, with a grace - // period of 10 ms after the expected time. - // However, due to rounding errors, this will sometimes appear as having occurred before - // 100 ms, so we allow a 1 ms leeway (99) on the lower end. - expect(r).toBeGreaterThanOrEqual(99); - expect(r).toBeLessThanOrEqual(110); - }); - }); - - it("converts the time with microsecond granularity", () => { - const nowInDays = Date.now() / (1000 * 60 * 60 * 24); - const res = getTime(UnitOfTime.Days); - // If the difference is greater than 1 microsecond, then the test is invalid. - expect((nowInDays - res) * 1_000_000).toBeLessThan(1); - }); - - it("should not overflow for 1000 years", () => { - // In milliseconds. - const now = Date.now(); - const aThousandYearsFromNow6 = now + UNIT_OF_TIME_MULTIPLIERS[UnitOfTime.Days] * 365 * 1000; - expect(UNIT_OF_TIME_MULTIPLIERS[UnitOfTime.Microseconds] * aThousandYearsFromNow6).toBeLessThan( - Number.MAX_SAFE_INTEGER - ); - expect(aThousandYearsFromNow6).toBeLessThan(Number.MAX_SAFE_INTEGER); - }); -});