From b9751d4a4a87170836561345480b84857d6794f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rn=20Andre=20Tangen=20=40gorillatron?= Date: Mon, 9 Oct 2023 15:49:09 +0200 Subject: [PATCH 1/4] remove sdk v1 --- components/markets/MarketHeader.tsx | 5 +- components/markets/ScalarPriceRange.tsx | 2 +- components/markets/market-card/index.tsx | 2 +- lib/gql/featured-markets.ts | 4 +- lib/gql/market-history.ts | 2 +- lib/gql/markets.ts | 2 +- lib/gql/trending-markets.ts | 4 +- lib/state/market-creation/types/form.ts | 2 +- lib/state/wallet.ts | 2 +- lib/types/markets.ts | 22 +++ lib/util/format-scalar-outcome.ts | 2 +- lib/util/market-status-details.ts | 4 +- lib/util/tx.ts | 5 +- lib/util/unsub-or-warns.ts | 9 + package.json | 1 - pages/avatar/[address].tsx | 1 - pages/markets/[marketid].tsx | 10 +- scripts/createDummyMarkets.ts | 205 ----------------------- yarn.lock | 185 +------------------- 19 files changed, 62 insertions(+), 407 deletions(-) create mode 100644 lib/util/unsub-or-warns.ts delete mode 100644 scripts/createDummyMarkets.ts diff --git a/components/markets/MarketHeader.tsx b/components/markets/MarketHeader.tsx index d33cb5a8d..5af7709e6 100644 --- a/components/markets/MarketHeader.tsx +++ b/components/markets/MarketHeader.tsx @@ -19,7 +19,7 @@ import { hasDatePassed } from "lib/util/hasDatePassed"; import { FC, PropsWithChildren, useState } from "react"; import { MarketTimer } from "./MarketTimer"; import { MarketTimerSkeleton } from "./MarketTimer"; -import { MarketDispute, OutcomeReport } from "@zeitgeistpm/sdk/dist/types"; +import { OutcomeReport } from "@zeitgeistpm/indexer"; import { MarketEventHistory, useMarketEventHistory, @@ -40,6 +40,7 @@ import { import { useMarketsStats } from "lib/hooks/queries/useMarketsStats"; import { MarketPromotionCallout } from "./PromotionCallout"; import { PromotedMarket } from "lib/cms/get-promoted-markets"; +import { MarketDispute } from "lib/types/markets"; export const UserIdentity: FC< PropsWithChildren<{ user: string; className?: string }> @@ -159,7 +160,7 @@ const MarketHistory: FC< }).format(marketHistory?.end?.timestamp); const getOutcome = (outcome: OutcomeReport) => { if (marketType.scalar === null) { - return categories[outcome["categorical"]]?.name; + return categories[outcome.categorical!]?.name; } else { return formatScalarOutcome(outcome["scalar"], scalarType); } diff --git a/components/markets/ScalarPriceRange.tsx b/components/markets/ScalarPriceRange.tsx index cb01cf93f..d218cdebf 100644 --- a/components/markets/ScalarPriceRange.tsx +++ b/components/markets/ScalarPriceRange.tsx @@ -1,4 +1,4 @@ -import type { ScalarRangeType } from "@zeitgeistpm/sdk/dist/types"; +import type { ScalarRangeType } from "@zeitgeistpm/sdk-next"; import { formatNumberCompact } from "lib/util/format-compact"; import { useMemo } from "react"; import { useResizeDetector } from "react-resize-detector"; diff --git a/components/markets/market-card/index.tsx b/components/markets/market-card/index.tsx index 8d864cacd..995d4408d 100644 --- a/components/markets/market-card/index.tsx +++ b/components/markets/market-card/index.tsx @@ -1,4 +1,4 @@ -import type { ScalarRangeType } from "@zeitgeistpm/sdk/dist/types"; +import type { ScalarRangeType } from "@zeitgeistpm/sdk-next"; import Skeleton from "components/ui/Skeleton"; import { motion } from "framer-motion"; import Decimal from "decimal.js"; diff --git a/lib/gql/featured-markets.ts b/lib/gql/featured-markets.ts index 95032e639..4aefc9582 100644 --- a/lib/gql/featured-markets.ts +++ b/lib/gql/featured-markets.ts @@ -2,7 +2,7 @@ import Decimal from "decimal.js"; import { gql, GraphQLClient } from "graphql-request"; import { FullContext, ScalarRangeType, Sdk } from "@zeitgeistpm/sdk-next"; -import { MarketCreation } from "@zeitgeistpm/sdk/dist/types"; +import { ZeitgeistPrimitivesMarketMarketCreation } from "@polkadot/types/lookup"; import { IndexedMarketCardData } from "components/markets/market-card/index"; import { ZTG } from "lib/constants"; import { MarketOutcome, MarketOutcomes } from "lib/types/markets"; @@ -83,7 +83,7 @@ const getFeaturedMarkets = async ( img: string; question: string; creator: string; - creation: MarketCreation; + creation: ZeitgeistPrimitivesMarketMarketCreation["type"]; marketType: { [key: string]: string }; scalarType: ScalarRangeType; categories: { color: string; name: string }[]; diff --git a/lib/gql/market-history.ts b/lib/gql/market-history.ts index 66bc4d266..a17bf51d1 100644 --- a/lib/gql/market-history.ts +++ b/lib/gql/market-history.ts @@ -1,5 +1,5 @@ import { gql, GraphQLClient } from "graphql-request"; -import { OutcomeReport } from "@zeitgeistpm/sdk/dist/types"; +import { OutcomeReport } from "@zeitgeistpm/indexer"; const historicalMarketQuery = gql` query HistoricalMarkets($marketId: Int) { diff --git a/lib/gql/markets.ts b/lib/gql/markets.ts index d033ed115..e67689269 100644 --- a/lib/gql/markets.ts +++ b/lib/gql/markets.ts @@ -1,8 +1,8 @@ import { MarketStatus, ScalarRangeType } from "@zeitgeistpm/sdk-next"; -import { MarketDispute, Report } from "@zeitgeistpm/sdk/dist/types"; import { gql, GraphQLClient } from "graphql-request"; import { DAY_SECONDS } from "lib/constants"; import { marketMetaFilter } from "./constants"; +import { MarketDispute, Report } from "lib/types/markets"; const marketIdsQuery = gql` query MarketIds($end: BigInt) { diff --git a/lib/gql/trending-markets.ts b/lib/gql/trending-markets.ts index a98073b9a..b4b679875 100644 --- a/lib/gql/trending-markets.ts +++ b/lib/gql/trending-markets.ts @@ -6,7 +6,7 @@ import { ScalarRangeType, Sdk, } from "@zeitgeistpm/sdk-next"; -import { MarketCreation } from "@zeitgeistpm/sdk/dist/types"; +import { ZeitgeistPrimitivesMarketMarketCreation } from "@polkadot/types/lookup"; import { IndexedMarketCardData } from "components/markets/market-card/index"; import Decimal from "decimal.js"; import { gql, GraphQLClient } from "graphql-request"; @@ -129,7 +129,7 @@ const getTrendingMarkets = async ( marketId: number; img: string; question: string; - creation: MarketCreation; + creation: ZeitgeistPrimitivesMarketMarketCreation["type"]; marketType: { [key: string]: string }; categories: { color: string; name: string }[]; outcomeAssets: string[]; diff --git a/lib/state/market-creation/types/form.ts b/lib/state/market-creation/types/form.ts index d6cde4fba..4dea6b7d8 100644 --- a/lib/state/market-creation/types/form.ts +++ b/lib/state/market-creation/types/form.ts @@ -6,7 +6,7 @@ import { ZTG, swapFeeFromFloat, } from "@zeitgeistpm/sdk-next"; -import { KeyringPairOrExtSigner } from "@zeitgeistpm/sdk/dist/types"; +import { KeyringPairOrExtSigner } from "@zeitgeistpm/rpc"; import { ChainTime } from "@zeitgeistpm/utility/dist/time"; import Decimal from "decimal.js"; import { BLOCK_TIME_SECONDS } from "lib/constants"; diff --git a/lib/state/wallet.ts b/lib/state/wallet.ts index b3c598d56..69eedc1d5 100644 --- a/lib/state/wallet.ts +++ b/lib/state/wallet.ts @@ -1,5 +1,5 @@ import { encodeAddress } from "@polkadot/util-crypto"; -import { KeyringPairOrExtSigner } from "@zeitgeistpm/sdk/dist/types"; +import { KeyringPairOrExtSigner } from "@zeitgeistpm/rpc"; import { tryCatch } from "@zeitgeistpm/utility/dist/option"; import { atom, getDefaultStore, useAtom } from "jotai"; import { isString } from "lodash-es"; diff --git a/lib/types/markets.ts b/lib/types/markets.ts index f8c5036ca..fab48d4b0 100644 --- a/lib/types/markets.ts +++ b/lib/types/markets.ts @@ -1,3 +1,5 @@ +import { OutcomeReport } from "@zeitgeistpm/indexer"; + export type MarketOutcome = { name: string; color?: string; @@ -17,3 +19,23 @@ export enum EMarketStatus { } export type MarketStatus = keyof typeof EMarketStatus; + +export type Report = { + at: number; + by: string; + outcome: OutcomeReport; +}; + +export type MarketDispute = { + at: number; + by: string; + outcome: OutcomeReport; +}; + +export type MarketTypeOf = + | { + categorical: number; + } + | { + scalar: string[]; + }; diff --git a/lib/util/format-scalar-outcome.ts b/lib/util/format-scalar-outcome.ts index 90e6dee06..3c5d94297 100644 --- a/lib/util/format-scalar-outcome.ts +++ b/lib/util/format-scalar-outcome.ts @@ -1,6 +1,6 @@ import { Decimal } from "decimal.js"; import { ZTG } from "../constants"; -import type { ScalarRangeType } from "@zeitgeistpm/sdk/dist/types"; +import type { ScalarRangeType } from "@zeitgeistpm/sdk-next"; export const formatScalarOutcome = ( outcome: string | number, diff --git a/lib/util/market-status-details.ts b/lib/util/market-status-details.ts index b63f5c94f..0f5f4fbba 100644 --- a/lib/util/market-status-details.ts +++ b/lib/util/market-status-details.ts @@ -1,12 +1,12 @@ -import type { ScalarRangeType } from "@zeitgeistpm/sdk/dist/types"; +import type { ScalarRangeType } from "@zeitgeistpm/sdk-next"; import { MarketStatus } from "@zeitgeistpm/sdk-next"; -import { MarketDispute, MarketTypeOf } from "@zeitgeistpm/sdk/dist/types"; import { formatScalarOutcome } from "./format-scalar-outcome"; import { MarketReport, isMarketCategoricalOutcome, isMarketScalarOutcome, } from "lib/types"; +import { MarketDispute, MarketTypeOf } from "lib/types/markets"; export const getMarketStatusDetails = ( marketType: MarketTypeOf, diff --git a/lib/util/tx.ts b/lib/util/tx.ts index 4c30a2fbe..3b2c3b8d2 100644 --- a/lib/util/tx.ts +++ b/lib/util/tx.ts @@ -1,10 +1,11 @@ import { SubmittableExtrinsic } from "@polkadot/api/types"; import { ISubmittableResult, IEventRecord } from "@polkadot/types/types"; -import { KeyringPairOrExtSigner } from "@zeitgeistpm/sdk/dist/types"; -import { isExtSigner, unsubOrWarns } from "@zeitgeistpm/sdk/dist/util"; +import { KeyringPairOrExtSigner, isExtSigner } from "@zeitgeistpm/rpc"; + import type { ApiPromise } from "@polkadot/api"; import { UseNotifications } from "lib/state/notifications"; +import { unsubOrWarns } from "./unsub-or-warns"; type GenericCallback = (...args: any[]) => void; diff --git a/lib/util/unsub-or-warns.ts b/lib/util/unsub-or-warns.ts new file mode 100644 index 000000000..01846a637 --- /dev/null +++ b/lib/util/unsub-or-warns.ts @@ -0,0 +1,9 @@ +export const unsubOrWarns = (unsub: () => void) => { + if (unsub) { + unsub(); + } else { + console.warn( + "Failing to unsubscribe from subscriptions could lead to memory bloat", + ); + } +}; diff --git a/package.json b/package.json index 2a1b2dfa3..b9999410a 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,6 @@ "@zeitgeistpm/avatara-nft-sdk": "^1.3.1", "@zeitgeistpm/avatara-react": "^1.3.2", "@zeitgeistpm/avatara-util": "^1.2.0", - "@zeitgeistpm/sdk": "^1.0.3", "@zeitgeistpm/sdk-next": "npm:@zeitgeistpm/sdk@2.36.1", "@zeitgeistpm/utility": "^2.20.0", "axios": "^0.21.4", diff --git a/pages/avatar/[address].tsx b/pages/avatar/[address].tsx index 6d88f45dd..7c0e2987c 100644 --- a/pages/avatar/[address].tsx +++ b/pages/avatar/[address].tsx @@ -11,7 +11,6 @@ // } from "@zeitgeistpm/avatara-react"; // import { sanitizeIpfsUrl } from "@zeitgeistpm/avatara-util"; // import { isRpcSdk } from "@zeitgeistpm/sdk-next"; -// import { ExtSigner } from "@zeitgeistpm/sdk/dist/types"; // import { tryCatch } from "@zeitgeistpm/utility/dist/either"; // import { fromNullable } from "@zeitgeistpm/utility/dist/option"; // import DiscordIcon from "components/icons/DiscordIcon"; diff --git a/pages/markets/[marketid].tsx b/pages/markets/[marketid].tsx index c9f8b179b..671eb7d3e 100644 --- a/pages/markets/[marketid].tsx +++ b/pages/markets/[marketid].tsx @@ -5,7 +5,6 @@ import { ScalarRangeType, parseAssetId, } from "@zeitgeistpm/sdk-next"; -import { MarketDispute } from "@zeitgeistpm/sdk/dist/types"; import { MarketLiquiditySection } from "components/liquidity/MarketLiquiditySection"; import DisputeResult from "components/markets/DisputeResult"; import { AddressDetails } from "components/markets/MarketAddresses"; @@ -13,7 +12,6 @@ import MarketAssetDetails from "components/markets/MarketAssetDetails"; import MarketChart from "components/markets/MarketChart"; import MarketHeader from "components/markets/MarketHeader"; import PoolDeployer from "components/markets/PoolDeployer"; -import { MarketPromotionCallout } from "components/markets/PromotionCallout"; import ReportResult from "components/markets/ReportResult"; import ScalarPriceRange from "components/markets/ScalarPriceRange"; import MarketMeta from "components/meta/MarketMeta"; @@ -25,10 +23,7 @@ import Skeleton from "components/ui/Skeleton"; import { ChartSeries } from "components/ui/TimeSeriesChart"; import Decimal from "decimal.js"; import { GraphQLClient } from "graphql-request"; -import { - PromotedMarket, - getMarketPromotion, -} from "lib/cms/get-promoted-markets"; +import { PromotedMarket } from "lib/cms/get-promoted-markets"; import { ZTG, environment, graphQlEndpoint } from "lib/constants"; import { MarketPageIndexedData, @@ -52,12 +47,13 @@ import { isMarketCategoricalOutcome, isValidMarketReport, } from "lib/types"; +import { MarketDispute } from "lib/types/markets"; import { parseAssetIdString } from "lib/util/parse-asset-id"; import { NextPage } from "next"; import dynamic from "next/dynamic"; import { useRouter } from "next/router"; import NotFoundPage from "pages/404"; -import { Fragment, useEffect, useMemo, useState } from "react"; +import { useEffect, useMemo, useState } from "react"; import { AlertTriangle, ChevronDown, X } from "react-feather"; import { AiOutlineFileAdd } from "react-icons/ai"; diff --git a/scripts/createDummyMarkets.ts b/scripts/createDummyMarkets.ts deleted file mode 100644 index f71a577d0..000000000 --- a/scripts/createDummyMarkets.ts +++ /dev/null @@ -1,205 +0,0 @@ -import SDK, { util } from "@zeitgeistpm/sdk"; -import { Swap } from "@zeitgeistpm/sdk/dist/models"; -import { waitReady } from "@polkadot/wasm-crypto"; -import { Command, Option } from "commander"; -import { - KeyringPairOrExtSigner, - MarketPeriod, -} from "@zeitgeistpm/sdk/dist/types"; -import dotenv from "dotenv"; -import { resolve } from "path"; -import { ZTG, DEFAULT_DEADLINES } from "../lib/constants"; -import { randomHexColor } from "../lib/util"; -import { capitalize } from "lodash"; - -const program = new Command(); - -dotenv.config({ path: resolve(__dirname, "..", ".env.local") }); -const seed = (process.env.NEXT_PUBLIC_TESTING_SEED as string).trim(); - -program - .option( - "-e, --endpoint [endpoint]", - "node rpc endpoint", - "ws://127.0.0.1:9944", - ) - .option( - "-nm, --num-markets [numMarkets]", - "number of markets to create", - "10", - ) - .option( - "-o, --offset [offset]", - "markets beginings will be offset time units apart", - "100", - ) - .option( - "-l, --length [number]", - "market lenght in `block`s or `timestamp`s depending on unit option.", - "86400000", - ) - .addOption( - new Option( - "-u, --unit [type]", - "use `block` or `timestamp` for market period unit. timestamps will be calculated from current time in ms.", - ) - .default("timestamp") - .choices(["block", "timestamp"]), - ) - .option( - "-no, --num-outcomes [numOutcomes]", - "number of outcomes for each market, ztg excluded", - "2", - ) - .option( - "-ct, --creation-type [creationType]", - "market creation type - permissionless or advised", - "advised", - ) - .option( - "-p, --deploy-pool", - "deploy default liquidity pool for each market", - false, - ); -program.parse(process.argv); - -console.log(program.opts()); - -const { - endpoint, - numMarkets, - offset, - numOutcomes, - deployPool, - unit, - length, - creationType, -} = program.opts(); - -const createCategoricalMarket = async ( - sdk: SDK, - num: number, - start: number, - end: number, - unit: "block" | "timestamp", - signer: KeyringPairOrExtSigner, -) => { - sdk = - sdk || - (await SDK.initialize(endpoint, { - ipfsClientUrl: "http://localhost:5001", - })); - - const slug = `${num}-end${end}`; - let period: MarketPeriod; - if (unit === "block") { - period = { - block: [start, end], - }; - } else { - period = { - timestamp: [start, end], - }; - } - - const metadata = { - description: "...", - slug, - question: `q.${slug}`, - categories: [...new Array(Number(numOutcomes))].map((_, idx) => { - return { - name: `C0${idx}.${slug}`, - ticker: `${num}.T${idx}`, - color: randomHexColor(), - }; - }), - }; - - const id = await sdk.models.createMarket({ - signer, - oracle: signer.address, - period, - metadata, - creationType: capitalize(creationType as string), - deadlines: DEFAULT_DEADLINES, - marketType: { Categorical: numOutcomes }, - disputeMechanism: { authorized: signer.address }, - scoringRule: "CPMM", - callbackOrPaymentInfo: false, - }); - - return +id; -}; - -(async () => { - await waitReady(); - - const sdk = await SDK.initialize(endpoint, { - ipfsClientUrl: "http://localhost:5001", - }); - const signer: KeyringPairOrExtSigner = util.signerFromSeed(seed); - const len = Number(length); - let end: number | undefined; - let id = +(await sdk.api.query.marketCommons.marketCounter()); - if (id > 0) { - id = id + 1; - } - const periodBlock = unit === "block"; - let start: number = -1; - let off = 0; - for (const _ of [...new Array(Number(numMarkets))]) { - if (start !== -1) { - start = start + off; - } else { - if (unit === "block") { - start = Number((await sdk.api.query.system.number()).toString()) + off; - } else { - start = new Date().valueOf() + 10000 + off; - } - } - off = off + Number(offset); - end = start + len; - - const marketId = await createCategoricalMarket( - sdk, - id, - start, - end, - periodBlock ? "block" : "timestamp", - signer, - ); - - if (deployPool && creationType === "advised") { - console.log( - "Unable to deploy pool for advised markets before they're accepted", - ); - } - - if (deployPool && creationType !== "advised") { - let market = await sdk.models.fetchMarketData(marketId); - - await market.buyCompleteSet(signer, 100 * ZTG); - - const baseWeight = (1 / numOutcomes) * 10 * ZTG; - let weights = []; - - for (let i = 0; i < numOutcomes; i++) { - weights.push(Math.floor(baseWeight).toString()); - } - - await market.deploySwapPool(signer, "0", "1000000000000", weights); - - market = await sdk.models.fetchMarketData(marketId); - - const pool = (await market.getPool()) as Swap; - const poolAccount = await pool.accountId(); - - console.log( - `\nDeployed pool with account address ${poolAccount.toString()}\n`, - ); - } - - id = marketId + 1; - } - sdk.api.disconnect(); -})(); diff --git a/yarn.lock b/yarn.lock index 68b8b5ab0..862c59f42 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1554,7 +1554,7 @@ __metadata: languageName: node linkType: hard -"@polkadot/api-augment@npm:9.14.2, @polkadot/api-augment@npm:^9.11.2": +"@polkadot/api-augment@npm:^9.11.2": version: 9.14.2 resolution: "@polkadot/api-augment@npm:9.14.2" dependencies: @@ -1582,49 +1582,6 @@ __metadata: languageName: node linkType: hard -"@polkadot/api-derive@npm:9.14.2": - version: 9.14.2 - resolution: "@polkadot/api-derive@npm:9.14.2" - dependencies: - "@babel/runtime": ^7.20.13 - "@polkadot/api": 9.14.2 - "@polkadot/api-augment": 9.14.2 - "@polkadot/api-base": 9.14.2 - "@polkadot/rpc-core": 9.14.2 - "@polkadot/types": 9.14.2 - "@polkadot/types-codec": 9.14.2 - "@polkadot/util": ^10.4.2 - "@polkadot/util-crypto": ^10.4.2 - rxjs: ^7.8.0 - checksum: 3baa6e0512173e1da27e294abaa53e834e673c807d23d35e85ccdf8ed74cd0d5c3e3f325ae510efdd943848190ffa2293bb44438c31fada97e75c9b88c99265c - languageName: node - linkType: hard - -"@polkadot/api@npm:9.14.2, @polkadot/api@npm:^9.13.2": - version: 9.14.2 - resolution: "@polkadot/api@npm:9.14.2" - dependencies: - "@babel/runtime": ^7.20.13 - "@polkadot/api-augment": 9.14.2 - "@polkadot/api-base": 9.14.2 - "@polkadot/api-derive": 9.14.2 - "@polkadot/keyring": ^10.4.2 - "@polkadot/rpc-augment": 9.14.2 - "@polkadot/rpc-core": 9.14.2 - "@polkadot/rpc-provider": 9.14.2 - "@polkadot/types": 9.14.2 - "@polkadot/types-augment": 9.14.2 - "@polkadot/types-codec": 9.14.2 - "@polkadot/types-create": 9.14.2 - "@polkadot/types-known": 9.14.2 - "@polkadot/util": ^10.4.2 - "@polkadot/util-crypto": ^10.4.2 - eventemitter3: ^5.0.0 - rxjs: ^7.8.0 - checksum: 64de9d2d34d5bda66a03251eb8898fc35eecb917563652984798363c8a4795d6ceb024e3b9048ff21a31e3723c649faac8b381db9a833e5516a76788d6781fe7 - languageName: node - linkType: hard - "@polkadot/extension-dapp@npm:^0.44.6": version: 0.44.9 resolution: "@polkadot/extension-dapp@npm:0.44.9" @@ -1657,7 +1614,7 @@ __metadata: languageName: node linkType: hard -"@polkadot/keyring@npm:^10.3.1, @polkadot/keyring@npm:^10.4.2": +"@polkadot/keyring@npm:^10.4.2": version: 10.4.2 resolution: "@polkadot/keyring@npm:10.4.2" dependencies: @@ -1733,18 +1690,6 @@ __metadata: languageName: node linkType: hard -"@polkadot/types-augment@npm:9.13.2": - version: 9.13.2 - resolution: "@polkadot/types-augment@npm:9.13.2" - dependencies: - "@babel/runtime": ^7.20.13 - "@polkadot/types": 9.13.2 - "@polkadot/types-codec": 9.13.2 - "@polkadot/util": ^10.3.1 - checksum: da7321cf7520c9e0c301f803488bcb3d5c4e5cc5bb43e1be5c0c8ad7ec1a0e91be446505ccf92766e23f848a169137c88942343aea7e6abdb1116dbeae458be6 - languageName: node - linkType: hard - "@polkadot/types-augment@npm:9.14.2": version: 9.14.2 resolution: "@polkadot/types-augment@npm:9.14.2" @@ -1757,17 +1702,6 @@ __metadata: languageName: node linkType: hard -"@polkadot/types-codec@npm:9.13.2": - version: 9.13.2 - resolution: "@polkadot/types-codec@npm:9.13.2" - dependencies: - "@babel/runtime": ^7.20.13 - "@polkadot/util": ^10.3.1 - "@polkadot/x-bigint": ^10.3.1 - checksum: 360d83a1e49b6864d6cb283f9fd9ff96ef7e8d5f42cc63a506959fc2165fe1fe265050a4efb1c1cbbb39ba7defb0a1b0a440a400b872aa6aaa506f0d619a2be2 - languageName: node - linkType: hard - "@polkadot/types-codec@npm:9.14.2": version: 9.14.2 resolution: "@polkadot/types-codec@npm:9.14.2" @@ -1779,17 +1713,6 @@ __metadata: languageName: node linkType: hard -"@polkadot/types-create@npm:9.13.2": - version: 9.13.2 - resolution: "@polkadot/types-create@npm:9.13.2" - dependencies: - "@babel/runtime": ^7.20.13 - "@polkadot/types-codec": 9.13.2 - "@polkadot/util": ^10.3.1 - checksum: b27f9890ce91165522f5557e9361dffa8f35134a9350ab67f5316fb584ba94b5af35480274623bf8a26f1ed0e848a362213e6f1ae579ed1ec858d36299d81a80 - languageName: node - linkType: hard - "@polkadot/types-create@npm:9.14.2": version: 9.14.2 resolution: "@polkadot/types-create@npm:9.14.2" @@ -1801,20 +1724,6 @@ __metadata: languageName: node linkType: hard -"@polkadot/types-known@npm:9.14.2": - version: 9.14.2 - resolution: "@polkadot/types-known@npm:9.14.2" - dependencies: - "@babel/runtime": ^7.20.13 - "@polkadot/networks": ^10.4.2 - "@polkadot/types": 9.14.2 - "@polkadot/types-codec": 9.14.2 - "@polkadot/types-create": 9.14.2 - "@polkadot/util": ^10.4.2 - checksum: 2bb5b39f1b734f37d76a26495b33baeeddd569de34534239c7222438cf336c8cb7ee8627a2dc9e995dbe6156623843ef77a7aea3ec8a36070fb671750725779b - languageName: node - linkType: hard - "@polkadot/types-support@npm:9.14.2": version: 9.14.2 resolution: "@polkadot/types-support@npm:9.14.2" @@ -1825,22 +1734,6 @@ __metadata: languageName: node linkType: hard -"@polkadot/types@npm:9.13.2": - version: 9.13.2 - resolution: "@polkadot/types@npm:9.13.2" - dependencies: - "@babel/runtime": ^7.20.13 - "@polkadot/keyring": ^10.3.1 - "@polkadot/types-augment": 9.13.2 - "@polkadot/types-codec": 9.13.2 - "@polkadot/types-create": 9.13.2 - "@polkadot/util": ^10.3.1 - "@polkadot/util-crypto": ^10.3.1 - rxjs: ^7.8.0 - checksum: aa582720eddafa7e7896486b05882dec35f664f91cf082af7075318a51aafd06f2457357134091873c09288c8057e38a7d22cfec9cd95800c3a76e45cc752b65 - languageName: node - linkType: hard - "@polkadot/types@npm:9.14.2, @polkadot/types@npm:^9.14.2": version: 9.14.2 resolution: "@polkadot/types@npm:9.14.2" @@ -1893,7 +1786,7 @@ __metadata: languageName: node linkType: hard -"@polkadot/util-crypto@npm:10.4.2, @polkadot/util-crypto@npm:^10.3.1, @polkadot/util-crypto@npm:^10.4.2": +"@polkadot/util-crypto@npm:10.4.2, @polkadot/util-crypto@npm:^10.4.2": version: 10.4.2 resolution: "@polkadot/util-crypto@npm:10.4.2" dependencies: @@ -1914,7 +1807,7 @@ __metadata: languageName: node linkType: hard -"@polkadot/util@npm:10.4.2, @polkadot/util@npm:^10.3.1, @polkadot/util@npm:^10.4.2": +"@polkadot/util@npm:10.4.2, @polkadot/util@npm:^10.4.2": version: 10.4.2 resolution: "@polkadot/util@npm:10.4.2" dependencies: @@ -2007,7 +1900,7 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-bigint@npm:10.4.2, @polkadot/x-bigint@npm:^10.3.1, @polkadot/x-bigint@npm:^10.4.2": +"@polkadot/x-bigint@npm:10.4.2, @polkadot/x-bigint@npm:^10.4.2": version: 10.4.2 resolution: "@polkadot/x-bigint@npm:10.4.2" dependencies: @@ -3119,27 +3012,6 @@ __metadata: languageName: node linkType: hard -"@zeitgeistpm/sdk@npm:^1.0.3": - version: 1.0.4 - resolution: "@zeitgeistpm/sdk@npm:1.0.4" - dependencies: - "@polkadot/api": ^9.13.2 - "@polkadot/keyring": ^10.3.1 - "@polkadot/util": ^10.3.1 - "@polkadot/util-crypto": ^10.3.1 - "@zeitgeistpm/type-defs": ^1.0.0 - "@zeitgeistpm/types": ^1.0.2 - commander: ^7.2.0 - decimal.js: ^10.3.1 - graphql: 15.x - graphql-request: ^3.6.1 - ipfs-http-client: ^49.0.4 - it-all: ^1.0.4 - uint8arrays: ^2.1.4 - checksum: f6cffb666f49594b7a3de29fd7cb74d351150bb7a1ebf47d1c7204690c739b2dc651bafdd9558ea753bffeccb935bee00efd417e23297c891e7f6432bbb251ba - languageName: node - linkType: hard - "@zeitgeistpm/substrate@npm:^1.2.0": version: 1.2.0 resolution: "@zeitgeistpm/substrate@npm:1.2.0" @@ -3155,24 +3027,6 @@ __metadata: languageName: node linkType: hard -"@zeitgeistpm/type-defs@npm:^1.0.0": - version: 1.0.0 - resolution: "@zeitgeistpm/type-defs@npm:1.0.0" - checksum: a45ecee6aeff82dcad8264c081845c7c7484ee5307e44fda03fd1b1240a8ea9fc4c4d34433ac1515191260399f0d4bd5b376042ef5d318459ea20d5b88bfe771 - languageName: node - linkType: hard - -"@zeitgeistpm/types@npm:^1.0.2": - version: 1.0.2 - resolution: "@zeitgeistpm/types@npm:1.0.2" - dependencies: - "@polkadot/types": 9.13.2 - "@zeitgeistpm/type-defs": ^1.0.0 - axios: ^0.21.1 - checksum: 338d67a6af6e84eb64425bec255f55e2fc14fd2c866f851372d3fd7377577214231f5812b18aca74c7f03972f35af45f25a55ad3c5d37eb9308cd036958a252f - languageName: node - linkType: hard - "@zeitgeistpm/ui@workspace:.": version: 0.0.0-use.local resolution: "@zeitgeistpm/ui@workspace:." @@ -3213,7 +3067,6 @@ __metadata: "@zeitgeistpm/avatara-nft-sdk": ^1.3.1 "@zeitgeistpm/avatara-react": ^1.3.2 "@zeitgeistpm/avatara-util": ^1.2.0 - "@zeitgeistpm/sdk": ^1.0.3 "@zeitgeistpm/sdk-next": "npm:@zeitgeistpm/sdk@2.36.1" "@zeitgeistpm/utility": ^2.20.0 autoprefixer: 10.2.5 @@ -3616,7 +3469,7 @@ __metadata: languageName: node linkType: hard -"axios@npm:^0.21.1, axios@npm:^0.21.4": +"axios@npm:^0.21.4": version: 0.21.4 resolution: "axios@npm:0.21.4" dependencies: @@ -4451,13 +4304,6 @@ __metadata: languageName: node linkType: hard -"commander@npm:^7.2.0": - version: 7.2.0 - resolution: "commander@npm:7.2.0" - checksum: 53501cbeee61d5157546c0bef0fedb6cdfc763a882136284bed9a07225f09a14b82d2a84e7637edfd1a679fb35ed9502fd58ef1d091e6287f60d790147f68ddc - languageName: node - linkType: hard - "commander@npm:^8.3.0": version: 8.3.0 resolution: "commander@npm:8.3.0" @@ -4556,7 +4402,7 @@ __metadata: languageName: node linkType: hard -"cross-fetch@npm:^3.0.6, cross-fetch@npm:^3.1.5": +"cross-fetch@npm:^3.1.5": version: 3.1.5 resolution: "cross-fetch@npm:3.1.5" dependencies: @@ -6006,19 +5852,6 @@ __metadata: languageName: node linkType: hard -"graphql-request@npm:^3.6.1": - version: 3.7.0 - resolution: "graphql-request@npm:3.7.0" - dependencies: - cross-fetch: ^3.0.6 - extract-files: ^9.0.0 - form-data: ^3.0.0 - peerDependencies: - graphql: 14 - 16 - checksum: db3800cc4ee884cd1514d7d5eafafb9ed27694278fdddd7402345754a7d25e7d713246c72aa510b439b6df2633b74f2cf74fb36864a22a857d5fb2de1cf0b4d8 - languageName: node - linkType: hard - "graphql-request@npm:^4.0.0": version: 4.3.0 resolution: "graphql-request@npm:4.3.0" @@ -6057,7 +5890,7 @@ __metadata: languageName: node linkType: hard -"graphql@npm:15.8.0, graphql@npm:15.x": +"graphql@npm:15.8.0": version: 15.8.0 resolution: "graphql@npm:15.8.0" checksum: 423325271db8858428641b9aca01699283d1fe5b40ef6d4ac622569ecca927019fce8196208b91dd1d8eb8114f00263fe661d241d0eb40c10e5bfd650f86ec5e @@ -11861,7 +11694,7 @@ __metadata: languageName: node linkType: hard -"uint8arrays@npm:^2.0.5, uint8arrays@npm:^2.1.2, uint8arrays@npm:^2.1.3, uint8arrays@npm:^2.1.4": +"uint8arrays@npm:^2.0.5, uint8arrays@npm:^2.1.2, uint8arrays@npm:^2.1.3": version: 2.1.10 resolution: "uint8arrays@npm:2.1.10" dependencies: From 44112c27523fe7110e12984dbae1cc1b2554ec23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rn=20Andre=20Tangen=20=40gorillatron?= Date: Mon, 9 Oct 2023 16:06:32 +0200 Subject: [PATCH 2/4] renamespace sdk-next to sdk --- components/account/AccountButton.tsx | 2 +- components/account/AccountModalContent.tsx | 2 +- .../AssetTradingButtons.tsx | 2 +- .../AssetActionButtons/DisputeButton.tsx | 2 +- .../AssetActionButtons/PoolShareButtons.tsx | 2 +- .../AssetActionButtons/RedeemButton.tsx | 2 +- .../AssetActionButtons/ReportButton.tsx | 2 +- .../assets/AssetActionButtons/index.tsx | 2 +- components/create/editor/Publishing.tsx | 11 +- components/front-page/LatestTrades.tsx | 2 +- components/liquidity/ExitPoolForm.tsx | 2 +- components/liquidity/JoinPoolForm.tsx | 2 +- components/liquidity/LiquidityModal.tsx | 2 +- .../liquidity/MarketLiquiditySection.tsx | 2 +- components/liquidity/PoolTable.tsx | 2 +- components/markets/BuyFullSetForm.tsx | 2 +- components/markets/DisputeResult.tsx | 2 +- components/markets/MarketAssetDetails.tsx | 2 +- components/markets/MarketChart.tsx | 2 +- .../MarketContextActionOutcomeSelector.tsx | 2 +- components/markets/MarketHeader.tsx | 2 +- components/markets/MarketTimer.tsx | 2 +- components/markets/MarketsList.tsx | 2 +- components/markets/PoolDeployer.tsx | 2 +- components/markets/PromotionCallout.tsx | 2 +- components/markets/ReportResult.tsx | 2 +- components/markets/ScalarPriceRange.tsx | 2 +- components/markets/SellFullSetForm.tsx | 2 +- components/markets/SimilarMarketsSection.tsx | 2 +- components/markets/market-card/index.tsx | 4 +- components/meta/MarketMeta.tsx | 2 +- components/outcomes/CategoricalDisputeBox.tsx | 2 +- components/outcomes/CategoricalReportBox.tsx | 2 +- components/outcomes/ScalarDisputeBox.tsx | 2 +- components/outcomes/ScalarReportBox.tsx | 2 +- components/portfolio/Breakdown.tsx | 2 +- components/portfolio/CurrenciesTable.tsx | 2 +- components/portfolio/DepositButton.tsx | 2 +- components/portfolio/MarketPositions.tsx | 2 +- components/portfolio/TransferButton.tsx | 7 +- components/portfolio/WithdrawButton.tsx | 2 +- components/settings/AccountSettingsForm.tsx | 2 +- components/settings/OtherSettingsForm.tsx | 2 +- components/trade-form/index.tsx | 2 +- components/ui/AssetSelect.tsx | 2 +- components/ui/TransactionButton.tsx | 2 +- lib/constants/foreign-asset.ts | 2 +- lib/constants/supported-currencies.ts | 2 +- lib/gql/display-name.ts | 2 +- lib/gql/featured-markets.ts | 2 +- lib/gql/get-network-stats.ts | 2 +- lib/gql/historical-prices.ts | 2 +- lib/gql/market-header.ts | 2 +- lib/gql/markets.ts | 2 +- lib/gql/trending-markets.ts | 2 +- lib/hooks/queries/useAccountAssetBalances.ts | 2 +- lib/hooks/queries/useAccountBonds.ts | 2 +- .../queries/useAccountPoolAssetBalances.ts | 2 +- lib/hooks/queries/useAccountTokenPositions.ts | 2 +- lib/hooks/queries/useAssetMetadata.ts | 2 +- lib/hooks/queries/useAssetUsdPrice.ts | 2 +- lib/hooks/queries/useBalance.ts | 2 +- lib/hooks/queries/useCategoryCounts.ts | 2 +- lib/hooks/queries/useChainConstants.ts | 2 +- lib/hooks/queries/useCurrencyBalances.ts | 2 +- lib/hooks/queries/useFeePayingAsset.ts | 2 +- lib/hooks/queries/useForeignAssetBalances.ts | 2 +- lib/hooks/queries/useIdentity.ts | 2 +- lib/hooks/queries/useInfiniteMarkets.ts | 2 +- lib/hooks/queries/useLatestTrades.tsx | 2 +- lib/hooks/queries/useMarket.ts | 2 +- .../queries/useMarket24hrPriceChanges.ts | 2 +- .../queries/useMarketDeadlineConstants.ts | 2 +- lib/hooks/queries/useMarketDisputes.ts | 2 +- lib/hooks/queries/useMarketEventHistory.ts | 2 +- .../queries/useMarketIsTradingEnabled.ts | 2 +- lib/hooks/queries/useMarketPoolId.ts | 2 +- lib/hooks/queries/useMarketPriceHistory.ts | 2 +- lib/hooks/queries/useMarketSpotPrices.ts | 2 +- lib/hooks/queries/useMarketStage.ts | 2 +- lib/hooks/queries/useMarketsByIds.ts | 2 +- lib/hooks/queries/useMarketsStats.ts | 2 +- lib/hooks/queries/usePool.ts | 2 +- lib/hooks/queries/usePoolAccountIds.ts | 2 +- lib/hooks/queries/usePoolBaseBalance.ts | 2 +- lib/hooks/queries/usePoolBaseBalances.ts | 2 +- lib/hooks/queries/usePoolLiquidity.ts | 2 +- lib/hooks/queries/usePoolsByIds.ts | 2 +- lib/hooks/queries/usePortfolioPositions.ts | 2 +- lib/hooks/queries/usePrizePool.ts | 2 +- lib/hooks/queries/useReadyToReportMarkets.ts | 2 +- lib/hooks/queries/useRedeemableMarkets.ts | 2 +- lib/hooks/queries/useRpcMarket.ts | 2 +- lib/hooks/queries/useSaturatedMarket.ts | 2 +- lib/hooks/queries/useSimilarMarkets.ts | 2 +- lib/hooks/queries/useTotalIssuance.ts | 2 +- lib/hooks/queries/useTotalIssuanceForPools.ts | 2 +- lib/hooks/queries/useTradeHistory.ts | 2 +- lib/hooks/queries/useTradeItemState.ts | 2 +- lib/hooks/queries/useTransactionHistory.ts | 2 +- lib/hooks/trade.tsx | 2 +- lib/hooks/useCrossChainExtrinsic.ts | 2 +- lib/hooks/useExtrinsic.ts | 2 +- lib/hooks/useSdkv2.ts | 2 +- lib/hooks/useSubscribeBlockEvents.ts | 2 +- lib/state/chaintime.ts | 2 +- lib/state/delay-queue.ts | 2 +- lib/state/market-creation/types/form.ts | 2 +- lib/state/market-creation/util/tickers.ts | 2 +- lib/types/index.ts | 2 +- lib/util/assets-are-equal.ts | 2 +- lib/util/assets.ts | 2 +- lib/util/calc-price-history-start.ts | 2 +- lib/util/format-scalar-outcome.ts | 2 +- lib/util/lookup-price.ts | 2 +- lib/util/market-status-details.ts | 4 +- lib/util/parse-asset-id.ts | 2 +- package.json | 3 +- pages/api/og/[marketId].ts | 2 +- pages/avatar/[address].tsx | 2 +- pages/deposit.tsx | 2 +- pages/index.tsx | 2 +- pages/leaderboard/[period].tsx | 2 +- pages/liquidity/[poolid].tsx | 2 +- pages/markets/[marketid].tsx | 2 +- pages/markets/await/[marketid].tsx | 2 +- pages/portfolio/[address].tsx | 2 +- scripts/mts/getSpotPrices.mts | 2 +- yarn.lock | 597 +++++++++++++++++- 129 files changed, 707 insertions(+), 165 deletions(-) diff --git a/components/account/AccountButton.tsx b/components/account/AccountButton.tsx index 96c5b39fb..a0c08e922 100644 --- a/components/account/AccountButton.tsx +++ b/components/account/AccountButton.tsx @@ -1,6 +1,6 @@ import { Menu, Popover, Transition } from "@headlessui/react"; import { getWallets } from "@talismn/connect-wallets"; -import { isRpcSdk, ZTG } from "@zeitgeistpm/sdk-next"; +import { isRpcSdk, ZTG } from "@zeitgeistpm/sdk"; import Avatar from "components/ui/Avatar"; import Modal from "components/ui/Modal"; import Decimal from "decimal.js"; diff --git a/components/account/AccountModalContent.tsx b/components/account/AccountModalContent.tsx index 2add34cf3..cf2f4eded 100644 --- a/components/account/AccountModalContent.tsx +++ b/components/account/AccountModalContent.tsx @@ -3,7 +3,7 @@ import { LogOut } from "react-feather"; import AccountSelect, { AccountOption } from "./AccountSelect"; import { useWallet } from "lib/state/wallet"; import { useZtgBalance } from "lib/hooks/queries/useZtgBalance"; -import { ZTG } from "@zeitgeistpm/sdk-next"; +import { ZTG } from "@zeitgeistpm/sdk"; import { useChainConstants } from "lib/hooks/queries/useChainConstants"; const AccountModalContent: FC = () => { diff --git a/components/assets/AssetActionButtons/AssetTradingButtons.tsx b/components/assets/AssetActionButtons/AssetTradingButtons.tsx index ec10bf8cf..a06d95f67 100644 --- a/components/assets/AssetActionButtons/AssetTradingButtons.tsx +++ b/components/assets/AssetActionButtons/AssetTradingButtons.tsx @@ -1,5 +1,5 @@ import { Dialog } from "@headlessui/react"; -import { ScalarAssetId, CategoricalAssetId } from "@zeitgeistpm/sdk-next"; +import { ScalarAssetId, CategoricalAssetId } from "@zeitgeistpm/sdk"; import TradeForm from "components/trade-form"; import Modal from "components/ui/Modal"; import SecondaryButton from "components/ui/SecondaryButton"; diff --git a/components/assets/AssetActionButtons/DisputeButton.tsx b/components/assets/AssetActionButtons/DisputeButton.tsx index 36669a5d5..84039006c 100644 --- a/components/assets/AssetActionButtons/DisputeButton.tsx +++ b/components/assets/AssetActionButtons/DisputeButton.tsx @@ -5,7 +5,7 @@ import { isRpcSdk, Market, MarketOutcomeAssetId, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import CategoricalDisputeBox from "components/outcomes/CategoricalDisputeBox"; import ScalarDisputeBox from "components/outcomes/ScalarDisputeBox"; import Modal from "components/ui/Modal"; diff --git a/components/assets/AssetActionButtons/PoolShareButtons.tsx b/components/assets/AssetActionButtons/PoolShareButtons.tsx index c629dfb41..fa8cffc63 100644 --- a/components/assets/AssetActionButtons/PoolShareButtons.tsx +++ b/components/assets/AssetActionButtons/PoolShareButtons.tsx @@ -12,7 +12,7 @@ import { getIndexOf, isRpcSdk, parseAssetId, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import { useChainConstants } from "lib/hooks/queries/useChainConstants"; import { useBalance } from "lib/hooks/queries/useBalance"; import { useWallet } from "lib/state/wallet"; diff --git a/components/assets/AssetActionButtons/RedeemButton.tsx b/components/assets/AssetActionButtons/RedeemButton.tsx index 448279998..a30810938 100644 --- a/components/assets/AssetActionButtons/RedeemButton.tsx +++ b/components/assets/AssetActionButtons/RedeemButton.tsx @@ -8,7 +8,7 @@ import { Market, MarketId, parseAssetId, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import SecondaryButton from "components/ui/SecondaryButton"; import Decimal from "decimal.js"; import { ZTG } from "lib/constants"; diff --git a/components/assets/AssetActionButtons/ReportButton.tsx b/components/assets/AssetActionButtons/ReportButton.tsx index c294b0636..f4cb21659 100644 --- a/components/assets/AssetActionButtons/ReportButton.tsx +++ b/components/assets/AssetActionButtons/ReportButton.tsx @@ -7,7 +7,7 @@ import { isRpcSdk, Market, ScalarAssetId, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import ScalarReportBox from "components/outcomes/ScalarReportBox"; import Modal from "components/ui/Modal"; import SecondaryButton from "components/ui/SecondaryButton"; diff --git a/components/assets/AssetActionButtons/index.tsx b/components/assets/AssetActionButtons/index.tsx index 538ed117a..1b783f9e0 100644 --- a/components/assets/AssetActionButtons/index.tsx +++ b/components/assets/AssetActionButtons/index.tsx @@ -1,4 +1,4 @@ -import { CategoricalAssetId, ScalarAssetId } from "@zeitgeistpm/sdk-next"; +import { CategoricalAssetId, ScalarAssetId } from "@zeitgeistpm/sdk"; import { useMarket } from "lib/hooks/queries/useMarket"; import { useMarketStage } from "lib/hooks/queries/useMarketStage"; import { useWallet } from "lib/state/wallet"; diff --git a/components/create/editor/Publishing.tsx b/components/create/editor/Publishing.tsx index 5c2227f5e..92e44c896 100644 --- a/components/create/editor/Publishing.tsx +++ b/components/create/editor/Publishing.tsx @@ -1,7 +1,12 @@ import { Dialog } from "@headlessui/react"; import { useQuery } from "@tanstack/react-query"; import { PollingTimeout, poll } from "@zeitgeistpm/avatara-util"; -import { IOZtgAssetId, ZTG, isFullSdk } from "@zeitgeistpm/sdk-next"; +import { + IOForeignAssetId, + IOZtgAssetId, + ZTG, + isFullSdk, +} from "@zeitgeistpm/sdk"; import { StorageError } from "@zeitgeistpm/web3.storage"; import Modal from "components/ui/Modal"; import TransactionButton from "components/ui/TransactionButton"; @@ -166,7 +171,9 @@ export const Publishing = ({ editor }: PublishingProps) => { const result = await sdk.model.markets.create( params, - feeDetails?.assetId, + IOForeignAssetId.is(feeDetails?.assetId) + ? feeDetails?.assetId + : undefined, ); const marketId = result.saturate().unwrap().market.marketId; diff --git a/components/front-page/LatestTrades.tsx b/components/front-page/LatestTrades.tsx index 47054bdc0..ec8f5cd47 100644 --- a/components/front-page/LatestTrades.tsx +++ b/components/front-page/LatestTrades.tsx @@ -2,7 +2,7 @@ import Table, { TableColumn, TableData } from "components/ui/Table"; import Link from "next/link"; import { formatNumberLocalized } from "lib/util"; import { useLatestTrades } from "lib/hooks/queries/useLatestTrades"; -import { ZTG } from "@zeitgeistpm/sdk-next"; +import { ZTG } from "@zeitgeistpm/sdk"; import moment from "moment"; import Avatar from "components/ui/Avatar"; diff --git a/components/liquidity/ExitPoolForm.tsx b/components/liquidity/ExitPoolForm.tsx index 2d6012420..84a61bf72 100644 --- a/components/liquidity/ExitPoolForm.tsx +++ b/components/liquidity/ExitPoolForm.tsx @@ -6,7 +6,7 @@ import { isRpcSdk, parseAssetId, ZTG, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import FormTransactionButton from "components/ui/FormTransactionButton"; import Input from "components/ui/Input"; import Decimal from "decimal.js"; diff --git a/components/liquidity/JoinPoolForm.tsx b/components/liquidity/JoinPoolForm.tsx index b57e657dd..197f6767b 100644 --- a/components/liquidity/JoinPoolForm.tsx +++ b/components/liquidity/JoinPoolForm.tsx @@ -1,5 +1,5 @@ import { useQueryClient } from "@tanstack/react-query"; -import { isRpcSdk, ZTG } from "@zeitgeistpm/sdk-next"; +import { isRpcSdk, ZTG } from "@zeitgeistpm/sdk"; import FormTransactionButton from "components/ui/FormTransactionButton"; import Input from "components/ui/Input"; import Decimal from "decimal.js"; diff --git a/components/liquidity/LiquidityModal.tsx b/components/liquidity/LiquidityModal.tsx index 7ff31f27c..0df9649ca 100644 --- a/components/liquidity/LiquidityModal.tsx +++ b/components/liquidity/LiquidityModal.tsx @@ -3,7 +3,7 @@ import { getIndexOf, IOMarketOutcomeAssetId, parseAssetId, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import Decimal from "decimal.js"; import { useAccountAssetBalances } from "lib/hooks/queries/useAccountAssetBalances"; import { useAccountPoolAssetBalances } from "lib/hooks/queries/useAccountPoolAssetBalances"; diff --git a/components/liquidity/MarketLiquiditySection.tsx b/components/liquidity/MarketLiquiditySection.tsx index 51628784e..56191fe46 100644 --- a/components/liquidity/MarketLiquiditySection.tsx +++ b/components/liquidity/MarketLiquiditySection.tsx @@ -1,5 +1,5 @@ import { FullMarketFragment } from "@zeitgeistpm/indexer"; -import { parseAssetId } from "@zeitgeistpm/sdk-next"; +import { parseAssetId } from "@zeitgeistpm/sdk"; import LiquidityModal from "components/liquidity/LiquidityModal"; import PoolTable from "components/liquidity/PoolTable"; import BuySellFullSetsButton from "components/markets/BuySellFullSetsButton"; diff --git a/components/liquidity/PoolTable.tsx b/components/liquidity/PoolTable.tsx index 1d1970fce..0fc2961f7 100644 --- a/components/liquidity/PoolTable.tsx +++ b/components/liquidity/PoolTable.tsx @@ -1,4 +1,4 @@ -import { IOBaseAssetId, parseAssetId, ZTG } from "@zeitgeistpm/sdk-next"; +import { IOBaseAssetId, parseAssetId, ZTG } from "@zeitgeistpm/sdk"; import Table, { TableColumn, TableData } from "components/ui/Table"; import Decimal from "decimal.js"; import { useAccountPoolAssetBalances } from "lib/hooks/queries/useAccountPoolAssetBalances"; diff --git a/components/markets/BuyFullSetForm.tsx b/components/markets/BuyFullSetForm.tsx index 996014a89..89f95a29d 100644 --- a/components/markets/BuyFullSetForm.tsx +++ b/components/markets/BuyFullSetForm.tsx @@ -1,4 +1,4 @@ -import { isRpcSdk, parseAssetId } from "@zeitgeistpm/sdk-next"; +import { isRpcSdk, parseAssetId } from "@zeitgeistpm/sdk"; import Input from "components/ui/Input"; import TransactionButton from "components/ui/TransactionButton"; import Decimal from "decimal.js"; diff --git a/components/markets/DisputeResult.tsx b/components/markets/DisputeResult.tsx index 7255a4e8e..b50352f96 100644 --- a/components/markets/DisputeResult.tsx +++ b/components/markets/DisputeResult.tsx @@ -1,5 +1,5 @@ import { FullMarketFragment } from "@zeitgeistpm/indexer"; -import { ScalarRangeType } from "@zeitgeistpm/sdk-next"; +import { ScalarRangeType } from "@zeitgeistpm/sdk"; import { TwitterBird } from "components/markets/TradeResult"; import { MarketCategoricalOutcome, diff --git a/components/markets/MarketAssetDetails.tsx b/components/markets/MarketAssetDetails.tsx index 29f481d02..441f75b29 100644 --- a/components/markets/MarketAssetDetails.tsx +++ b/components/markets/MarketAssetDetails.tsx @@ -3,7 +3,7 @@ import { CategoricalAssetId, MarketOutcomeAssetId, ScalarAssetId, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import AssetActionButtons from "components/assets/AssetActionButtons"; import Table, { TableColumn, TableData } from "components/ui/Table"; import Decimal from "decimal.js"; diff --git a/components/markets/MarketChart.tsx b/components/markets/MarketChart.tsx index 2b84e14f8..1c6788b97 100644 --- a/components/markets/MarketChart.tsx +++ b/components/markets/MarketChart.tsx @@ -1,4 +1,4 @@ -import { MarketStatus, parseAssetId } from "@zeitgeistpm/sdk-next"; +import { MarketStatus, parseAssetId } from "@zeitgeistpm/sdk"; import TimeFilters, { filters, TimeFilter } from "components/ui/TimeFilters"; import TimeSeriesChart, { ChartSeries } from "components/ui/TimeSeriesChart"; import { useAssetMetadata } from "lib/hooks/queries/useAssetMetadata"; diff --git a/components/markets/MarketContextActionOutcomeSelector.tsx b/components/markets/MarketContextActionOutcomeSelector.tsx index 8e480f9dc..103ce6e90 100644 --- a/components/markets/MarketContextActionOutcomeSelector.tsx +++ b/components/markets/MarketContextActionOutcomeSelector.tsx @@ -1,6 +1,6 @@ import { Listbox, Transition } from "@headlessui/react"; import { FullMarketFragment } from "@zeitgeistpm/indexer"; -import { MarketOutcomeAssetId, getIndexOf } from "@zeitgeistpm/sdk-next"; +import { MarketOutcomeAssetId, getIndexOf } from "@zeitgeistpm/sdk"; import Input from "components/ui/Input"; import TruncatedText from "components/ui/TruncatedText"; import Fuse from "fuse.js"; diff --git a/components/markets/MarketHeader.tsx b/components/markets/MarketHeader.tsx index 5af7709e6..c772b7bd7 100644 --- a/components/markets/MarketHeader.tsx +++ b/components/markets/MarketHeader.tsx @@ -5,7 +5,7 @@ import { MarketStatus, ScalarRangeType, parseAssetId, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import Avatar from "components/ui/Avatar"; import Skeleton from "components/ui/Skeleton"; import Decimal from "decimal.js"; diff --git a/components/markets/MarketTimer.tsx b/components/markets/MarketTimer.tsx index 1aa34d43c..828f43356 100644 --- a/components/markets/MarketTimer.tsx +++ b/components/markets/MarketTimer.tsx @@ -1,4 +1,4 @@ -import { isInfinite, MarketStage } from "@zeitgeistpm/sdk-next"; +import { isInfinite, MarketStage } from "@zeitgeistpm/sdk"; import { clamp } from "lodash-es"; import Skeleton from "components/ui/Skeleton"; import moment from "moment"; diff --git a/components/markets/MarketsList.tsx b/components/markets/MarketsList.tsx index 2aeefde68..49853eacf 100644 --- a/components/markets/MarketsList.tsx +++ b/components/markets/MarketsList.tsx @@ -1,4 +1,4 @@ -import { ScalarRangeType } from "@zeitgeistpm/sdk-next"; +import { ScalarRangeType } from "@zeitgeistpm/sdk"; import React, { useEffect, useState } from "react"; import Decimal from "decimal.js"; import { useInView } from "react-intersection-observer"; diff --git a/components/markets/PoolDeployer.tsx b/components/markets/PoolDeployer.tsx index 3a943a4dc..5d9bbea69 100644 --- a/components/markets/PoolDeployer.tsx +++ b/components/markets/PoolDeployer.tsx @@ -5,7 +5,7 @@ import { isRpcSdk, parseAssetId, swapFeeFromFloat, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import TransactionButton from "components/ui/TransactionButton"; import Decimal from "decimal.js"; import { ZTG } from "lib/constants"; diff --git a/components/markets/PromotionCallout.tsx b/components/markets/PromotionCallout.tsx index 44b4049e7..d4202edc8 100644 --- a/components/markets/PromotionCallout.tsx +++ b/components/markets/PromotionCallout.tsx @@ -1,5 +1,5 @@ import { Dialog } from "@headlessui/react"; -import { IndexerContext, Market } from "@zeitgeistpm/sdk-next"; +import { IndexerContext, Market } from "@zeitgeistpm/sdk"; import Modal from "components/ui/Modal"; import { PromotedMarket } from "lib/cms/get-promoted-markets"; import { MarketPageIndexedData } from "lib/gql/markets"; diff --git a/components/markets/ReportResult.tsx b/components/markets/ReportResult.tsx index 746b7e5a6..1479ee580 100644 --- a/components/markets/ReportResult.tsx +++ b/components/markets/ReportResult.tsx @@ -1,5 +1,5 @@ import { FullMarketFragment } from "@zeitgeistpm/indexer"; -import { ScalarRangeType } from "@zeitgeistpm/sdk-next"; +import { ScalarRangeType } from "@zeitgeistpm/sdk"; import { TwitterBird } from "components/markets/TradeResult"; import { MarketCategoricalOutcome, diff --git a/components/markets/ScalarPriceRange.tsx b/components/markets/ScalarPriceRange.tsx index d218cdebf..a5330c672 100644 --- a/components/markets/ScalarPriceRange.tsx +++ b/components/markets/ScalarPriceRange.tsx @@ -1,4 +1,4 @@ -import type { ScalarRangeType } from "@zeitgeistpm/sdk-next"; +import type { ScalarRangeType } from "@zeitgeistpm/sdk"; import { formatNumberCompact } from "lib/util/format-compact"; import { useMemo } from "react"; import { useResizeDetector } from "react-resize-detector"; diff --git a/components/markets/SellFullSetForm.tsx b/components/markets/SellFullSetForm.tsx index cd7063e48..43ee8b2bc 100644 --- a/components/markets/SellFullSetForm.tsx +++ b/components/markets/SellFullSetForm.tsx @@ -1,4 +1,4 @@ -import { isRpcSdk } from "@zeitgeistpm/sdk-next"; +import { isRpcSdk } from "@zeitgeistpm/sdk"; import Input from "components/ui/Input"; import TransactionButton from "components/ui/TransactionButton"; import Decimal from "decimal.js"; diff --git a/components/markets/SimilarMarketsSection.tsx b/components/markets/SimilarMarketsSection.tsx index 8d2f99cad..729cffb25 100644 --- a/components/markets/SimilarMarketsSection.tsx +++ b/components/markets/SimilarMarketsSection.tsx @@ -1,5 +1,5 @@ import type { FullMarketFragment } from "@zeitgeistpm/indexer"; -import { ScalarRangeType } from "@zeitgeistpm/sdk-next"; +import { ScalarRangeType } from "@zeitgeistpm/sdk"; import MarketCard from "components/markets/market-card"; import Decimal from "decimal.js"; import { ZTG } from "lib/constants"; diff --git a/components/markets/market-card/index.tsx b/components/markets/market-card/index.tsx index 995d4408d..d9c85b8c5 100644 --- a/components/markets/market-card/index.tsx +++ b/components/markets/market-card/index.tsx @@ -1,4 +1,4 @@ -import type { ScalarRangeType } from "@zeitgeistpm/sdk-next"; +import type { ScalarRangeType } from "@zeitgeistpm/sdk"; import Skeleton from "components/ui/Skeleton"; import { motion } from "framer-motion"; import Decimal from "decimal.js"; @@ -15,7 +15,7 @@ import { IOBaseAssetId, IOForeignAssetId, parseAssetId, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import { lookupAssetImagePath } from "lib/constants/foreign-asset"; import Image from "next/image"; import MarketImage from "components/ui/MarketImage"; diff --git a/components/meta/MarketMeta.tsx b/components/meta/MarketMeta.tsx index a0162b269..9f4c92ef8 100644 --- a/components/meta/MarketMeta.tsx +++ b/components/meta/MarketMeta.tsx @@ -1,4 +1,4 @@ -import { IndexerContext, Market } from "@zeitgeistpm/sdk-next"; +import { IndexerContext, Market } from "@zeitgeistpm/sdk"; import { MarketPageIndexedData } from "lib/gql/markets"; import { OgHead } from "./OgHead"; diff --git a/components/outcomes/CategoricalDisputeBox.tsx b/components/outcomes/CategoricalDisputeBox.tsx index ffe8be906..423145dbe 100644 --- a/components/outcomes/CategoricalDisputeBox.tsx +++ b/components/outcomes/CategoricalDisputeBox.tsx @@ -7,7 +7,7 @@ import { Market, MarketOutcomeAssetId, parseAssetId, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import TransactionButton from "components/ui/TransactionButton"; import { useChainConstants } from "lib/hooks/queries/useChainConstants"; import { diff --git a/components/outcomes/CategoricalReportBox.tsx b/components/outcomes/CategoricalReportBox.tsx index 877a16520..2e7980ee3 100644 --- a/components/outcomes/CategoricalReportBox.tsx +++ b/components/outcomes/CategoricalReportBox.tsx @@ -7,7 +7,7 @@ import { isRpcSdk, Market, parseAssetId, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import MarketContextActionOutcomeSelector from "components/markets/MarketContextActionOutcomeSelector"; import TransactionButton from "components/ui/TransactionButton"; import TruncatedText from "components/ui/TruncatedText"; diff --git a/components/outcomes/ScalarDisputeBox.tsx b/components/outcomes/ScalarDisputeBox.tsx index 50e3f37fe..a13c8199a 100644 --- a/components/outcomes/ScalarDisputeBox.tsx +++ b/components/outcomes/ScalarDisputeBox.tsx @@ -1,4 +1,4 @@ -import { IndexerContext, isRpcSdk, Market } from "@zeitgeistpm/sdk-next"; +import { IndexerContext, isRpcSdk, Market } from "@zeitgeistpm/sdk"; import TransactionButton from "components/ui/TransactionButton"; import Decimal from "decimal.js"; import { ZTG } from "lib/constants"; diff --git a/components/outcomes/ScalarReportBox.tsx b/components/outcomes/ScalarReportBox.tsx index 9e15e0189..858511378 100644 --- a/components/outcomes/ScalarReportBox.tsx +++ b/components/outcomes/ScalarReportBox.tsx @@ -4,7 +4,7 @@ import { ScalarRangeType, getScalarBounds, isRpcSdk, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import Input from "components/ui/Input"; import TransactionButton from "components/ui/TransactionButton"; import { DateTimeInput } from "components/ui/inputs"; diff --git a/components/portfolio/Breakdown.tsx b/components/portfolio/Breakdown.tsx index 498fa9c71..d03fd2f55 100644 --- a/components/portfolio/Breakdown.tsx +++ b/components/portfolio/Breakdown.tsx @@ -1,5 +1,5 @@ import Skeleton from "components/ui/Skeleton"; -import { ZTG } from "@zeitgeistpm/sdk-next"; +import { ZTG } from "@zeitgeistpm/sdk"; import Decimal from "decimal.js"; import { PorfolioBreakdown } from "lib/hooks/queries/usePortfolioPositions"; import { formatNumberLocalized } from "lib/util"; diff --git a/components/portfolio/CurrenciesTable.tsx b/components/portfolio/CurrenciesTable.tsx index 924f9cbf2..e0e28f2cd 100644 --- a/components/portfolio/CurrenciesTable.tsx +++ b/components/portfolio/CurrenciesTable.tsx @@ -12,7 +12,7 @@ import Image from "next/image"; import { lookupAssetImagePath } from "lib/constants/foreign-asset"; import { ChainName, CHAIN_IMAGES } from "lib/constants/chains"; import TransferButton from "./TransferButton"; -import { AssetId } from "@zeitgeistpm/sdk-next"; +import { AssetId } from "@zeitgeistpm/sdk"; import { convertDecimals } from "lib/util/convert-decimals"; const columns: TableColumn[] = [ diff --git a/components/portfolio/DepositButton.tsx b/components/portfolio/DepositButton.tsx index 6fcd0744e..b31dd8668 100644 --- a/components/portfolio/DepositButton.tsx +++ b/components/portfolio/DepositButton.tsx @@ -1,5 +1,5 @@ import { Dialog } from "@headlessui/react"; -import { ZTG } from "@zeitgeistpm/sdk-next"; +import { ZTG } from "@zeitgeistpm/sdk"; import FormTransactionButton from "components/ui/FormTransactionButton"; import Modal from "components/ui/Modal"; import SecondaryButton from "components/ui/SecondaryButton"; diff --git a/components/portfolio/MarketPositions.tsx b/components/portfolio/MarketPositions.tsx index e4d996a51..d0920a060 100644 --- a/components/portfolio/MarketPositions.tsx +++ b/components/portfolio/MarketPositions.tsx @@ -5,7 +5,7 @@ import { IOPoolShareAssetId, Market, ZTG, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import DisputeButton from "components/assets/AssetActionButtons/DisputeButton"; import RedeemButton from "components/assets/AssetActionButtons/RedeemButton"; import ReportButton from "components/assets/AssetActionButtons/ReportButton"; diff --git a/components/portfolio/TransferButton.tsx b/components/portfolio/TransferButton.tsx index 5822b33da..959309ca1 100644 --- a/components/portfolio/TransferButton.tsx +++ b/components/portfolio/TransferButton.tsx @@ -4,12 +4,7 @@ import React, { useMemo, useState } from "react"; import { Controller, useForm } from "react-hook-form"; import type { ApiPromise } from "@polkadot/api"; import { encodeAddress } from "@polkadot/keyring"; -import { - AssetId, - IOForeignAssetId, - ZTG, - isRpcSdk, -} from "@zeitgeistpm/sdk-next"; +import { AssetId, IOForeignAssetId, ZTG, isRpcSdk } from "@zeitgeistpm/sdk"; import AddressInput, { AddressOption } from "components/ui/AddressInput"; import AssetInput from "components/ui/AssetInput"; import { AssetOption } from "components/ui/AssetSelect"; diff --git a/components/portfolio/WithdrawButton.tsx b/components/portfolio/WithdrawButton.tsx index 228059cb6..984e8362b 100644 --- a/components/portfolio/WithdrawButton.tsx +++ b/components/portfolio/WithdrawButton.tsx @@ -1,6 +1,6 @@ import { Dialog } from "@headlessui/react"; import type { ApiPromise } from "@polkadot/api"; -import { isRpcSdk } from "@zeitgeistpm/sdk-next"; +import { isRpcSdk } from "@zeitgeistpm/sdk"; import FormTransactionButton from "components/ui/FormTransactionButton"; import Modal from "components/ui/Modal"; import SecondaryButton from "components/ui/SecondaryButton"; diff --git a/components/settings/AccountSettingsForm.tsx b/components/settings/AccountSettingsForm.tsx index 6b318faac..07e2cc464 100644 --- a/components/settings/AccountSettingsForm.tsx +++ b/components/settings/AccountSettingsForm.tsx @@ -1,6 +1,6 @@ import React from "react"; import { useForm } from "react-hook-form"; -import { isRpcSdk } from "@zeitgeistpm/sdk-next"; +import { isRpcSdk } from "@zeitgeistpm/sdk"; import FormTransactionButton from "components/ui/FormTransactionButton"; import { identityRootKey } from "lib/hooks/queries/useIdentity"; import { useExtrinsic } from "lib/hooks/useExtrinsic"; diff --git a/components/settings/OtherSettingsForm.tsx b/components/settings/OtherSettingsForm.tsx index ec318b111..a7d9486d5 100644 --- a/components/settings/OtherSettingsForm.tsx +++ b/components/settings/OtherSettingsForm.tsx @@ -2,7 +2,7 @@ import React, { useEffect } from "react"; import { Controller, useForm } from "react-hook-form"; import AddressInput, { AddressOption } from "components/ui/AddressInput"; import FormTransactionButton from "components/ui/FormTransactionButton"; -import { isRpcSdk } from "@zeitgeistpm/sdk-next"; +import { isRpcSdk } from "@zeitgeistpm/sdk"; import { useSdkv2 } from "lib/hooks/useSdkv2"; import { useWallet } from "lib/state/wallet"; import { isValidPolkadotAddress } from "lib/util"; diff --git a/components/trade-form/index.tsx b/components/trade-form/index.tsx index 369dc65df..d5ccae62d 100644 --- a/components/trade-form/index.tsx +++ b/components/trade-form/index.tsx @@ -9,7 +9,7 @@ import { MarketOutcomeAssetId, ZTG, getMarketIdOf, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import MarketContextActionOutcomeSelector from "components/markets/MarketContextActionOutcomeSelector"; import TradeResult from "components/markets/TradeResult"; import Input from "components/ui/Input"; diff --git a/components/ui/AssetSelect.tsx b/components/ui/AssetSelect.tsx index 7f6fa45b9..4fc621efe 100644 --- a/components/ui/AssetSelect.tsx +++ b/components/ui/AssetSelect.tsx @@ -1,4 +1,4 @@ -import { AssetId, ZTG } from "@zeitgeistpm/sdk-next"; +import { AssetId, ZTG } from "@zeitgeistpm/sdk"; import Image from "next/image"; import { useBalance } from "lib/hooks/queries/useBalance"; import { useWallet } from "lib/state/wallet"; diff --git a/components/ui/TransactionButton.tsx b/components/ui/TransactionButton.tsx index 5164cb959..2ab30541e 100644 --- a/components/ui/TransactionButton.tsx +++ b/components/ui/TransactionButton.tsx @@ -1,6 +1,6 @@ import { SubmittableExtrinsic } from "@polkadot/api/types"; import { ISubmittableResult } from "@polkadot/types/types"; -import { isRpcSdk } from "@zeitgeistpm/sdk-next"; +import { isRpcSdk } from "@zeitgeistpm/sdk"; import { ZTG } from "lib/constants"; import { useChainConstants } from "lib/hooks/queries/useChainConstants"; import { useExtrinsicFee } from "lib/hooks/queries/useExtrinsicFee"; diff --git a/lib/constants/foreign-asset.ts b/lib/constants/foreign-asset.ts index fd70d7fee..6cfffacb8 100644 --- a/lib/constants/foreign-asset.ts +++ b/lib/constants/foreign-asset.ts @@ -1,4 +1,4 @@ -import { BaseAssetId, IOForeignAssetId } from "@zeitgeistpm/sdk-next"; +import { BaseAssetId, IOForeignAssetId } from "@zeitgeistpm/sdk"; import { ChainName } from "./chains"; type ForeignAssetMetadata = { diff --git a/lib/constants/supported-currencies.ts b/lib/constants/supported-currencies.ts index b0e3413a4..16a30ff52 100644 --- a/lib/constants/supported-currencies.ts +++ b/lib/constants/supported-currencies.ts @@ -1,4 +1,4 @@ -import { AssetId } from "@zeitgeistpm/sdk-next"; +import { AssetId } from "@zeitgeistpm/sdk"; import { Unpacked } from "@zeitgeistpm/utility/dist/array"; import { isEqual } from "lodash-es"; diff --git a/lib/gql/display-name.ts b/lib/gql/display-name.ts index 7f1bc70da..81f08d3e9 100644 --- a/lib/gql/display-name.ts +++ b/lib/gql/display-name.ts @@ -1,4 +1,4 @@ -import { FullContext, Sdk } from "@zeitgeistpm/sdk-next"; +import { FullContext, Sdk } from "@zeitgeistpm/sdk"; export const getDisplayName = async ( sdk: Sdk, diff --git a/lib/gql/featured-markets.ts b/lib/gql/featured-markets.ts index 4aefc9582..a77119945 100644 --- a/lib/gql/featured-markets.ts +++ b/lib/gql/featured-markets.ts @@ -1,7 +1,7 @@ import Decimal from "decimal.js"; import { gql, GraphQLClient } from "graphql-request"; -import { FullContext, ScalarRangeType, Sdk } from "@zeitgeistpm/sdk-next"; +import { FullContext, ScalarRangeType, Sdk } from "@zeitgeistpm/sdk"; import { ZeitgeistPrimitivesMarketMarketCreation } from "@polkadot/types/lookup"; import { IndexedMarketCardData } from "components/markets/market-card/index"; import { ZTG } from "lib/constants"; diff --git a/lib/gql/get-network-stats.ts b/lib/gql/get-network-stats.ts index 6f60c71e6..3fe250a6f 100644 --- a/lib/gql/get-network-stats.ts +++ b/lib/gql/get-network-stats.ts @@ -1,4 +1,4 @@ -import { BaseAssetId, FullContext, Sdk, ZTG } from "@zeitgeistpm/sdk-next"; +import { BaseAssetId, FullContext, Sdk, ZTG } from "@zeitgeistpm/sdk"; import Decimal from "decimal.js"; import { fetchAllPages } from "lib/util/fetch-all-pages"; import { parseAssetIdString } from "lib/util/parse-asset-id"; diff --git a/lib/gql/historical-prices.ts b/lib/gql/historical-prices.ts index 0a566a655..cde783649 100644 --- a/lib/gql/historical-prices.ts +++ b/lib/gql/historical-prices.ts @@ -1,4 +1,4 @@ -import { BaseAssetId, IOForeignAssetId } from "@zeitgeistpm/sdk-next"; +import { BaseAssetId, IOForeignAssetId } from "@zeitgeistpm/sdk"; import { environment } from "lib/constants"; import { FOREIGN_ASSET_METADATA } from "lib/constants/foreign-asset"; diff --git a/lib/gql/market-header.ts b/lib/gql/market-header.ts index 4dfd260a0..cd4f8a6ef 100644 --- a/lib/gql/market-header.ts +++ b/lib/gql/market-header.ts @@ -1,6 +1,6 @@ import { gql } from "graphql-request"; import { marketMetaFilter } from "./constants"; -import { IndexerContext, Sdk } from "@zeitgeistpm/sdk-next"; +import { IndexerContext, Sdk } from "@zeitgeistpm/sdk"; const marketHeaderQuery = gql` query MarketTransactionHeader($marketIds: [Int!]) { diff --git a/lib/gql/markets.ts b/lib/gql/markets.ts index e67689269..e634d437f 100644 --- a/lib/gql/markets.ts +++ b/lib/gql/markets.ts @@ -1,4 +1,4 @@ -import { MarketStatus, ScalarRangeType } from "@zeitgeistpm/sdk-next"; +import { MarketStatus, ScalarRangeType } from "@zeitgeistpm/sdk"; import { gql, GraphQLClient } from "graphql-request"; import { DAY_SECONDS } from "lib/constants"; import { marketMetaFilter } from "./constants"; diff --git a/lib/gql/trending-markets.ts b/lib/gql/trending-markets.ts index b4b679875..554fc28fa 100644 --- a/lib/gql/trending-markets.ts +++ b/lib/gql/trending-markets.ts @@ -5,7 +5,7 @@ import { IOForeignAssetId, ScalarRangeType, Sdk, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import { ZeitgeistPrimitivesMarketMarketCreation } from "@polkadot/types/lookup"; import { IndexedMarketCardData } from "components/markets/market-card/index"; import Decimal from "decimal.js"; diff --git a/lib/hooks/queries/useAccountAssetBalances.ts b/lib/hooks/queries/useAccountAssetBalances.ts index 5b6dd9ae5..e966751ca 100644 --- a/lib/hooks/queries/useAccountAssetBalances.ts +++ b/lib/hooks/queries/useAccountAssetBalances.ts @@ -1,6 +1,6 @@ import { OrmlTokensAccountData } from "@polkadot/types/lookup"; import { useQueries, UseQueryResult } from "@tanstack/react-query"; -import { AssetId, isRpcSdk, RpcContext } from "@zeitgeistpm/sdk-next"; +import { AssetId, isRpcSdk, RpcContext } from "@zeitgeistpm/sdk"; import { getApiAtBlock } from "lib/util/get-api-at"; import { useSdkv2 } from "../useSdkv2"; import { useMemo } from "react"; diff --git a/lib/hooks/queries/useAccountBonds.ts b/lib/hooks/queries/useAccountBonds.ts index aea5bd2fd..cc6bd4b6b 100644 --- a/lib/hooks/queries/useAccountBonds.ts +++ b/lib/hooks/queries/useAccountBonds.ts @@ -1,5 +1,5 @@ import { useQuery } from "@tanstack/react-query"; -import { isIndexedSdk } from "@zeitgeistpm/sdk-next"; +import { isIndexedSdk } from "@zeitgeistpm/sdk"; import { gql } from "graphql-request"; import { useSdkv2 } from "../useSdkv2"; import { marketMetaFilter } from "lib/gql/constants"; diff --git a/lib/hooks/queries/useAccountPoolAssetBalances.ts b/lib/hooks/queries/useAccountPoolAssetBalances.ts index 45ca30406..8b6208d34 100644 --- a/lib/hooks/queries/useAccountPoolAssetBalances.ts +++ b/lib/hooks/queries/useAccountPoolAssetBalances.ts @@ -6,7 +6,7 @@ import { isRpcSdk, parseAssetId, Pool, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import { getApiAtBlock } from "lib/util/get-api-at"; import { useSdkv2 } from "../useSdkv2"; import { FullPoolFragment } from "@zeitgeistpm/indexer"; diff --git a/lib/hooks/queries/useAccountTokenPositions.ts b/lib/hooks/queries/useAccountTokenPositions.ts index 973b43466..77ac75063 100644 --- a/lib/hooks/queries/useAccountTokenPositions.ts +++ b/lib/hooks/queries/useAccountTokenPositions.ts @@ -1,5 +1,5 @@ import { useQuery } from "@tanstack/react-query"; -import { isIndexedSdk } from "@zeitgeistpm/sdk-next"; +import { isIndexedSdk } from "@zeitgeistpm/sdk"; import { useSdkv2 } from "../useSdkv2"; export const positionsRootKey = "account-token-positions"; diff --git a/lib/hooks/queries/useAssetMetadata.ts b/lib/hooks/queries/useAssetMetadata.ts index 6948d8cba..8af3023ba 100644 --- a/lib/hooks/queries/useAssetMetadata.ts +++ b/lib/hooks/queries/useAssetMetadata.ts @@ -5,7 +5,7 @@ import { IOZtgAssetId, ZTG, isRpcSdk, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import { useSdkv2 } from "../useSdkv2"; import { useChainConstants } from "./useChainConstants"; import { XcmVersionedMultiLocation } from "@polkadot/types/lookup"; diff --git a/lib/hooks/queries/useAssetUsdPrice.ts b/lib/hooks/queries/useAssetUsdPrice.ts index a4ce33819..fba8d2712 100644 --- a/lib/hooks/queries/useAssetUsdPrice.ts +++ b/lib/hooks/queries/useAssetUsdPrice.ts @@ -5,7 +5,7 @@ import { IOForeignAssetId, IOZtgAssetId, parseAssetId, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import Decimal from "decimal.js"; import { environment } from "lib/constants"; import { FOREIGN_ASSET_METADATA } from "lib/constants/foreign-asset"; diff --git a/lib/hooks/queries/useBalance.ts b/lib/hooks/queries/useBalance.ts index b9992fb62..c579364f5 100644 --- a/lib/hooks/queries/useBalance.ts +++ b/lib/hooks/queries/useBalance.ts @@ -1,5 +1,5 @@ import { useQuery } from "@tanstack/react-query"; -import { AssetId, IOZtgAssetId, isRpcSdk } from "@zeitgeistpm/sdk-next"; +import { AssetId, IOZtgAssetId, isRpcSdk } from "@zeitgeistpm/sdk"; import Decimal from "decimal.js"; import { getApiAtBlock } from "lib/util/get-api-at"; import { useSdkv2 } from "../useSdkv2"; diff --git a/lib/hooks/queries/useCategoryCounts.ts b/lib/hooks/queries/useCategoryCounts.ts index 4f9e9af32..54be04315 100644 --- a/lib/hooks/queries/useCategoryCounts.ts +++ b/lib/hooks/queries/useCategoryCounts.ts @@ -1,5 +1,5 @@ import { useQuery } from "@tanstack/react-query"; -import { isIndexedSdk } from "@zeitgeistpm/sdk-next"; +import { isIndexedSdk } from "@zeitgeistpm/sdk"; import { CATEGORIES } from "components/front-page/PopularCategories"; import { getCategoryCounts } from "lib/gql/popular-categories"; import { useSdkv2 } from "../useSdkv2"; diff --git a/lib/hooks/queries/useChainConstants.ts b/lib/hooks/queries/useChainConstants.ts index fea4ef6d2..ea6ae4aad 100644 --- a/lib/hooks/queries/useChainConstants.ts +++ b/lib/hooks/queries/useChainConstants.ts @@ -1,5 +1,5 @@ import { useQuery } from "@tanstack/react-query"; -import { isRpcSdk } from "@zeitgeistpm/sdk-next"; +import { isRpcSdk } from "@zeitgeistpm/sdk"; import { ZTG } from "lib/constants"; import { useSdkv2 } from "../useSdkv2"; diff --git a/lib/hooks/queries/useCurrencyBalances.ts b/lib/hooks/queries/useCurrencyBalances.ts index cfa3b9b4b..5ebbf8f82 100644 --- a/lib/hooks/queries/useCurrencyBalances.ts +++ b/lib/hooks/queries/useCurrencyBalances.ts @@ -1,5 +1,5 @@ import { useQuery } from "@tanstack/react-query"; -import { isRpcSdk } from "@zeitgeistpm/sdk-next"; +import { isRpcSdk } from "@zeitgeistpm/sdk"; import Decimal from "decimal.js"; import { ChainName, CHAINS } from "lib/constants/chains"; import { useCrossChainApis } from "lib/state/cross-chain"; diff --git a/lib/hooks/queries/useFeePayingAsset.ts b/lib/hooks/queries/useFeePayingAsset.ts index 394ccd7c0..f1ed127a2 100644 --- a/lib/hooks/queries/useFeePayingAsset.ts +++ b/lib/hooks/queries/useFeePayingAsset.ts @@ -1,5 +1,5 @@ import { UseQueryResult, useQuery } from "@tanstack/react-query"; -import { AssetId, ZTG } from "@zeitgeistpm/sdk-next"; +import { AssetId, ZTG } from "@zeitgeistpm/sdk"; import Decimal from "decimal.js"; import { useWallet } from "lib/state/wallet"; import { useAssetMetadata } from "./useAssetMetadata"; diff --git a/lib/hooks/queries/useForeignAssetBalances.ts b/lib/hooks/queries/useForeignAssetBalances.ts index c42a59c5f..9cea9cc6e 100644 --- a/lib/hooks/queries/useForeignAssetBalances.ts +++ b/lib/hooks/queries/useForeignAssetBalances.ts @@ -1,5 +1,5 @@ import { useQuery } from "@tanstack/react-query"; -import { isRpcSdk } from "@zeitgeistpm/sdk-next"; +import { isRpcSdk } from "@zeitgeistpm/sdk"; import Decimal from "decimal.js"; import { ChainName } from "lib/constants/chains"; import { FOREIGN_ASSET_METADATA } from "lib/constants/foreign-asset"; diff --git a/lib/hooks/queries/useIdentity.ts b/lib/hooks/queries/useIdentity.ts index 1e59e5c8b..57fb1583d 100644 --- a/lib/hooks/queries/useIdentity.ts +++ b/lib/hooks/queries/useIdentity.ts @@ -1,5 +1,5 @@ import { useQuery } from "@tanstack/react-query"; -import { isRpcSdk } from "@zeitgeistpm/sdk-next"; +import { isRpcSdk } from "@zeitgeistpm/sdk"; import { Judgement, UserIdentity } from "lib/types/user-identity"; import { useSdkv2 } from "../useSdkv2"; diff --git a/lib/hooks/queries/useInfiniteMarkets.ts b/lib/hooks/queries/useInfiniteMarkets.ts index ca6766056..b5263f876 100644 --- a/lib/hooks/queries/useInfiniteMarkets.ts +++ b/lib/hooks/queries/useInfiniteMarkets.ts @@ -1,5 +1,5 @@ import { useInfiniteQuery, useQueryClient } from "@tanstack/react-query"; -import { IndexerContext, isIndexedSdk, Market } from "@zeitgeistpm/sdk-next"; +import { IndexerContext, isIndexedSdk, Market } from "@zeitgeistpm/sdk"; import { MarketOrderByInput, MarketWhereInput } from "@zeitgeistpm/indexer"; import { getOutcomesForMarkets } from "lib/gql/markets-list/outcomes-for-markets"; import { getCurrentPrediction } from "lib/util/assets"; diff --git a/lib/hooks/queries/useLatestTrades.tsx b/lib/hooks/queries/useLatestTrades.tsx index 9e75c2a3d..08a92612f 100644 --- a/lib/hooks/queries/useLatestTrades.tsx +++ b/lib/hooks/queries/useLatestTrades.tsx @@ -7,7 +7,7 @@ import { IOMarketOutcomeAssetId, isIndexedSdk, parseAssetId, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import Decimal from "decimal.js"; import { BLOCK_TIME_SECONDS } from "lib/constants"; import { getMarketHeaders, MarketHeader } from "lib/gql/market-header"; diff --git a/lib/hooks/queries/useMarket.ts b/lib/hooks/queries/useMarket.ts index 22bbf4492..39275162c 100644 --- a/lib/hooks/queries/useMarket.ts +++ b/lib/hooks/queries/useMarket.ts @@ -1,5 +1,5 @@ import { useQuery } from "@tanstack/react-query"; -import { IndexerContext, isIndexedSdk, Sdk } from "@zeitgeistpm/sdk-next"; +import { IndexerContext, isIndexedSdk, Sdk } from "@zeitgeistpm/sdk"; import { FullMarketFragment } from "@zeitgeistpm/indexer"; import { memoize } from "lodash-es"; import * as batshit from "@yornaath/batshit"; diff --git a/lib/hooks/queries/useMarket24hrPriceChanges.ts b/lib/hooks/queries/useMarket24hrPriceChanges.ts index 940ee3eac..524de5a1a 100644 --- a/lib/hooks/queries/useMarket24hrPriceChanges.ts +++ b/lib/hooks/queries/useMarket24hrPriceChanges.ts @@ -1,5 +1,5 @@ import { useQuery } from "@tanstack/react-query"; -import { isRpcSdk } from "@zeitgeistpm/sdk-next"; +import { isRpcSdk } from "@zeitgeistpm/sdk"; import { useEffect, useState } from "react"; import { useSdkv2 } from "../useSdkv2"; import { useChainConstants } from "./useChainConstants"; diff --git a/lib/hooks/queries/useMarketDeadlineConstants.ts b/lib/hooks/queries/useMarketDeadlineConstants.ts index ceda2d749..4aa885fdb 100644 --- a/lib/hooks/queries/useMarketDeadlineConstants.ts +++ b/lib/hooks/queries/useMarketDeadlineConstants.ts @@ -1,5 +1,5 @@ import { useQuery } from "@tanstack/react-query"; -import { isRpcSdk } from "@zeitgeistpm/sdk-next"; +import { isRpcSdk } from "@zeitgeistpm/sdk"; import { useSdkv2 } from "../useSdkv2"; export const rootKey = "market-deadline-constants"; diff --git a/lib/hooks/queries/useMarketDisputes.ts b/lib/hooks/queries/useMarketDisputes.ts index c39b7ea12..5c6cc898d 100644 --- a/lib/hooks/queries/useMarketDisputes.ts +++ b/lib/hooks/queries/useMarketDisputes.ts @@ -1,5 +1,5 @@ import { useQuery } from "@tanstack/react-query"; -import { Context, isRpcSdk, Market } from "@zeitgeistpm/sdk-next"; +import { Context, isRpcSdk, Market } from "@zeitgeistpm/sdk"; import { useSdkv2 } from "../useSdkv2"; export const marketDisputesRootKey = "market-disputes"; diff --git a/lib/hooks/queries/useMarketEventHistory.ts b/lib/hooks/queries/useMarketEventHistory.ts index 9336313dd..7e91ccbcf 100644 --- a/lib/hooks/queries/useMarketEventHistory.ts +++ b/lib/hooks/queries/useMarketEventHistory.ts @@ -1,5 +1,5 @@ import { useQuery, UseQueryResult } from "@tanstack/react-query"; -import { isRpcSdk, isIndexedSdk } from "@zeitgeistpm/sdk-next"; +import { isRpcSdk, isIndexedSdk } from "@zeitgeistpm/sdk"; import { useSdkv2 } from "../useSdkv2"; import { MarketEvent } from "lib/gql/market-history"; import { useMarket } from "./useMarket"; diff --git a/lib/hooks/queries/useMarketIsTradingEnabled.ts b/lib/hooks/queries/useMarketIsTradingEnabled.ts index b6c65aa9a..f03b5a6f1 100644 --- a/lib/hooks/queries/useMarketIsTradingEnabled.ts +++ b/lib/hooks/queries/useMarketIsTradingEnabled.ts @@ -5,7 +5,7 @@ import { isIndexedData, Market, MetadataStorage, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import { useSdkv2 } from "../useSdkv2"; export const rootKey = "market-enabled"; diff --git a/lib/hooks/queries/useMarketPoolId.ts b/lib/hooks/queries/useMarketPoolId.ts index e1e0ff321..82e5b238a 100644 --- a/lib/hooks/queries/useMarketPoolId.ts +++ b/lib/hooks/queries/useMarketPoolId.ts @@ -1,5 +1,5 @@ import { useQuery } from "@tanstack/react-query"; -import { isRpcSdk } from "@zeitgeistpm/sdk-next"; +import { isRpcSdk } from "@zeitgeistpm/sdk"; import { useSdkv2 } from "../useSdkv2"; export const marketPoolIdRootKey = "market-pool-Id"; diff --git a/lib/hooks/queries/useMarketPriceHistory.ts b/lib/hooks/queries/useMarketPriceHistory.ts index 1fdbf41ba..58d01deea 100644 --- a/lib/hooks/queries/useMarketPriceHistory.ts +++ b/lib/hooks/queries/useMarketPriceHistory.ts @@ -1,5 +1,5 @@ import { useQuery } from "@tanstack/react-query"; -import { isIndexedSdk } from "@zeitgeistpm/sdk-next"; +import { isIndexedSdk } from "@zeitgeistpm/sdk"; import { TimeUnit } from "components/ui/TimeFilters"; import { gql, GraphQLClient } from "graphql-request"; import { useSdkv2 } from "../useSdkv2"; diff --git a/lib/hooks/queries/useMarketSpotPrices.ts b/lib/hooks/queries/useMarketSpotPrices.ts index 42a6c95d7..7e3fb617f 100644 --- a/lib/hooks/queries/useMarketSpotPrices.ts +++ b/lib/hooks/queries/useMarketSpotPrices.ts @@ -1,5 +1,5 @@ import { useQuery } from "@tanstack/react-query"; -import { isRpcSdk } from "@zeitgeistpm/sdk-next"; +import { isRpcSdk } from "@zeitgeistpm/sdk"; import Decimal from "decimal.js"; import { calcSpotPrice } from "lib/math"; import { useSdkv2 } from "../useSdkv2"; diff --git a/lib/hooks/queries/useMarketStage.ts b/lib/hooks/queries/useMarketStage.ts index 156fb03bf..f3bc1a5af 100644 --- a/lib/hooks/queries/useMarketStage.ts +++ b/lib/hooks/queries/useMarketStage.ts @@ -1,5 +1,5 @@ import { useQuery } from "@tanstack/react-query"; -import { Context, isRpcSdk, Market } from "@zeitgeistpm/sdk-next"; +import { Context, isRpcSdk, Market } from "@zeitgeistpm/sdk"; import { useSdkv2 } from "../useSdkv2"; import { marketsRootQuery } from "./useMarket"; import { useChainTime } from "lib/state/chaintime"; diff --git a/lib/hooks/queries/useMarketsByIds.ts b/lib/hooks/queries/useMarketsByIds.ts index eb46efdec..f183f6084 100644 --- a/lib/hooks/queries/useMarketsByIds.ts +++ b/lib/hooks/queries/useMarketsByIds.ts @@ -1,5 +1,5 @@ import { useQuery, useQueryClient } from "@tanstack/react-query"; -import { isIndexedSdk } from "@zeitgeistpm/sdk-next"; +import { isIndexedSdk } from "@zeitgeistpm/sdk"; import { useSdkv2 } from "../useSdkv2"; import { marketsRootQuery, UseMarketFilter } from "./useMarket"; import { marketMetaFilter } from "./constants"; diff --git a/lib/hooks/queries/useMarketsStats.ts b/lib/hooks/queries/useMarketsStats.ts index c1dbdcc89..4d6d78d1f 100644 --- a/lib/hooks/queries/useMarketsStats.ts +++ b/lib/hooks/queries/useMarketsStats.ts @@ -1,5 +1,5 @@ import { useQuery, UseQueryResult } from "@tanstack/react-query"; -import { isIndexedSdk } from "@zeitgeistpm/sdk-next"; +import { isIndexedSdk } from "@zeitgeistpm/sdk"; import { getMarketsStats, MarketStats } from "lib/gql/markets-stats"; import { useSdkv2 } from "../useSdkv2"; diff --git a/lib/hooks/queries/usePool.ts b/lib/hooks/queries/usePool.ts index 4db4276af..0d52df87c 100644 --- a/lib/hooks/queries/usePool.ts +++ b/lib/hooks/queries/usePool.ts @@ -1,5 +1,5 @@ import { useQuery } from "@tanstack/react-query"; -import { isIndexedSdk, PoolGetQuery } from "@zeitgeistpm/sdk-next"; +import { isIndexedSdk, PoolGetQuery } from "@zeitgeistpm/sdk"; import { useSdkv2 } from "../useSdkv2"; export const poolsRootKey = "pools"; diff --git a/lib/hooks/queries/usePoolAccountIds.ts b/lib/hooks/queries/usePoolAccountIds.ts index 79afe7b9b..da987ebfc 100644 --- a/lib/hooks/queries/usePoolAccountIds.ts +++ b/lib/hooks/queries/usePoolAccountIds.ts @@ -1,5 +1,5 @@ import { useQueries } from "@tanstack/react-query"; -import { Context, isRpcSdk, Pool } from "@zeitgeistpm/sdk-next"; +import { Context, isRpcSdk, Pool } from "@zeitgeistpm/sdk"; import { useSdkv2 } from "../useSdkv2"; export const rootKey = "pool-account-ids"; diff --git a/lib/hooks/queries/usePoolBaseBalance.ts b/lib/hooks/queries/usePoolBaseBalance.ts index 2b6317498..687913e71 100644 --- a/lib/hooks/queries/usePoolBaseBalance.ts +++ b/lib/hooks/queries/usePoolBaseBalance.ts @@ -1,4 +1,4 @@ -import { parseAssetId } from "@zeitgeistpm/sdk-next"; +import { parseAssetId } from "@zeitgeistpm/sdk"; import { useBalance } from "./useBalance"; import { usePool } from "./usePool"; diff --git a/lib/hooks/queries/usePoolBaseBalances.ts b/lib/hooks/queries/usePoolBaseBalances.ts index c4eadec16..8572186ea 100644 --- a/lib/hooks/queries/usePoolBaseBalances.ts +++ b/lib/hooks/queries/usePoolBaseBalances.ts @@ -5,7 +5,7 @@ import { isRpcSdk, parseAssetId, PoolList, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import Decimal from "decimal.js"; import { getApiAtBlock } from "lib/util/get-api-at"; import { useSdkv2 } from "../useSdkv2"; diff --git a/lib/hooks/queries/usePoolLiquidity.ts b/lib/hooks/queries/usePoolLiquidity.ts index 73febd4b8..3ee1b5704 100644 --- a/lib/hooks/queries/usePoolLiquidity.ts +++ b/lib/hooks/queries/usePoolLiquidity.ts @@ -1,5 +1,5 @@ import { useQuery } from "@tanstack/react-query"; -import { parseAssetId } from "@zeitgeistpm/sdk-next"; +import { parseAssetId } from "@zeitgeistpm/sdk"; import Decimal from "decimal.js"; import { parseAssetIdString } from "lib/util/parse-asset-id"; import { useSdkv2 } from "../useSdkv2"; diff --git a/lib/hooks/queries/usePoolsByIds.ts b/lib/hooks/queries/usePoolsByIds.ts index a72954b4c..7913f6444 100644 --- a/lib/hooks/queries/usePoolsByIds.ts +++ b/lib/hooks/queries/usePoolsByIds.ts @@ -6,7 +6,7 @@ import { isMarketIdQuery, isPoolIdQuery, PoolGetQuery, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import { useSdkv2 } from "../useSdkv2"; import { poolsRootKey } from "./usePool"; diff --git a/lib/hooks/queries/usePortfolioPositions.ts b/lib/hooks/queries/usePortfolioPositions.ts index 2f76ddab4..ae0603ffe 100644 --- a/lib/hooks/queries/usePortfolioPositions.ts +++ b/lib/hooks/queries/usePortfolioPositions.ts @@ -17,7 +17,7 @@ import { IOForeignAssetId, IOCategoricalAssetId, IOScalarAssetId, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import { isNotNull } from "@zeitgeistpm/utility/dist/null"; import Decimal from "decimal.js"; import { diff --git a/lib/hooks/queries/usePrizePool.ts b/lib/hooks/queries/usePrizePool.ts index 4df6ad9fd..da4078456 100644 --- a/lib/hooks/queries/usePrizePool.ts +++ b/lib/hooks/queries/usePrizePool.ts @@ -1,5 +1,5 @@ import { useQuery } from "@tanstack/react-query"; -import { isRpcSdk } from "@zeitgeistpm/sdk-next"; +import { isRpcSdk } from "@zeitgeistpm/sdk"; import Decimal from "decimal.js"; import { useSdkv2 } from "../useSdkv2"; import { useMarket } from "./useMarket"; diff --git a/lib/hooks/queries/useReadyToReportMarkets.ts b/lib/hooks/queries/useReadyToReportMarkets.ts index 01228fa97..ecbbdd5c1 100644 --- a/lib/hooks/queries/useReadyToReportMarkets.ts +++ b/lib/hooks/queries/useReadyToReportMarkets.ts @@ -1,6 +1,6 @@ import { useQuery } from "@tanstack/react-query"; import { MarketStatus } from "@zeitgeistpm/indexer"; -import { isFullSdk } from "@zeitgeistpm/sdk-next"; +import { isFullSdk } from "@zeitgeistpm/sdk"; import { isNotNull } from "@zeitgeistpm/utility/dist/null"; import { useSdkv2 } from "../useSdkv2"; import { useChainTime } from "lib/state/chaintime"; diff --git a/lib/hooks/queries/useRedeemableMarkets.ts b/lib/hooks/queries/useRedeemableMarkets.ts index 1f053da72..f6fc5aff0 100644 --- a/lib/hooks/queries/useRedeemableMarkets.ts +++ b/lib/hooks/queries/useRedeemableMarkets.ts @@ -5,7 +5,7 @@ import { getMarketIdOf, isIndexedSdk, parseAssetId, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import { MarketStatus } from "@zeitgeistpm/indexer"; import { useSdkv2 } from "../useSdkv2"; import { useAccountTokenPositions } from "./useAccountTokenPositions"; diff --git a/lib/hooks/queries/useRpcMarket.ts b/lib/hooks/queries/useRpcMarket.ts index fe220959d..7cc673ad8 100644 --- a/lib/hooks/queries/useRpcMarket.ts +++ b/lib/hooks/queries/useRpcMarket.ts @@ -1,5 +1,5 @@ import { useQuery } from "@tanstack/react-query"; -import { isRpcSdk } from "@zeitgeistpm/sdk-next"; +import { isRpcSdk } from "@zeitgeistpm/sdk"; import { useSdkv2 } from "../useSdkv2"; export const rpcMarketRootKey = "rpc-market"; diff --git a/lib/hooks/queries/useSaturatedMarket.ts b/lib/hooks/queries/useSaturatedMarket.ts index bf700bf62..9040ab395 100644 --- a/lib/hooks/queries/useSaturatedMarket.ts +++ b/lib/hooks/queries/useSaturatedMarket.ts @@ -1,5 +1,5 @@ import { useQuery } from "@tanstack/react-query"; -import { Context, isRpcData, Market } from "@zeitgeistpm/sdk-next"; +import { Context, isRpcData, Market } from "@zeitgeistpm/sdk"; import { useSdkv2 } from "../useSdkv2"; export const rootKey = "market:saturated"; diff --git a/lib/hooks/queries/useSimilarMarkets.ts b/lib/hooks/queries/useSimilarMarkets.ts index 22b45d588..3929177e2 100644 --- a/lib/hooks/queries/useSimilarMarkets.ts +++ b/lib/hooks/queries/useSimilarMarkets.ts @@ -1,5 +1,5 @@ import { useQuery } from "@tanstack/react-query"; -import { isIndexedSdk, isRpcSdk } from "@zeitgeistpm/sdk-next"; +import { isIndexedSdk, isRpcSdk } from "@zeitgeistpm/sdk"; import { MarketStatus, MarketOrderByInput } from "@zeitgeistpm/indexer"; import Decimal from "decimal.js"; import { useSdkv2 } from "../useSdkv2"; diff --git a/lib/hooks/queries/useTotalIssuance.ts b/lib/hooks/queries/useTotalIssuance.ts index 955768173..dabbf3c36 100644 --- a/lib/hooks/queries/useTotalIssuance.ts +++ b/lib/hooks/queries/useTotalIssuance.ts @@ -1,4 +1,4 @@ -import { AssetId, isRpcSdk } from "@zeitgeistpm/sdk-next"; +import { AssetId, isRpcSdk } from "@zeitgeistpm/sdk"; import { useQuery } from "@tanstack/react-query"; import { useSdkv2 } from "../useSdkv2"; diff --git a/lib/hooks/queries/useTotalIssuanceForPools.ts b/lib/hooks/queries/useTotalIssuanceForPools.ts index d5de59163..36a3150b2 100644 --- a/lib/hooks/queries/useTotalIssuanceForPools.ts +++ b/lib/hooks/queries/useTotalIssuanceForPools.ts @@ -1,7 +1,7 @@ import type { u128 } from "@polkadot/types"; import { useQueries, UseQueryResult } from "@tanstack/react-query"; import * as batshit from "@yornaath/batshit"; -import { isRpcSdk, Pool, RpcContext, Sdk } from "@zeitgeistpm/sdk-next"; +import { isRpcSdk, Pool, RpcContext, Sdk } from "@zeitgeistpm/sdk"; import { memoize } from "lodash-es"; import { useSdkv2 } from "../useSdkv2"; diff --git a/lib/hooks/queries/useTradeHistory.ts b/lib/hooks/queries/useTradeHistory.ts index 4e029419b..a8f92fbc7 100644 --- a/lib/hooks/queries/useTradeHistory.ts +++ b/lib/hooks/queries/useTradeHistory.ts @@ -13,7 +13,7 @@ import { isRpcSdk, MarketId, parseAssetId, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import Decimal from "decimal.js"; import { getMarketHeaders, MarketHeader } from "lib/gql/market-header"; import { useSdkv2 } from "../useSdkv2"; diff --git a/lib/hooks/queries/useTradeItemState.ts b/lib/hooks/queries/useTradeItemState.ts index a9cb08b2e..093ad6665 100644 --- a/lib/hooks/queries/useTradeItemState.ts +++ b/lib/hooks/queries/useTradeItemState.ts @@ -4,7 +4,7 @@ import { getIndexOf, getMarketIdOf, parseAssetId, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import Decimal from "decimal.js"; import { MAX_IN_OUT_RATIO, ZTG } from "lib/constants"; import { calcSpotPrice } from "lib/math"; diff --git a/lib/hooks/queries/useTransactionHistory.ts b/lib/hooks/queries/useTransactionHistory.ts index 6c0e32f23..1b75cde17 100644 --- a/lib/hooks/queries/useTransactionHistory.ts +++ b/lib/hooks/queries/useTransactionHistory.ts @@ -4,7 +4,7 @@ import { getMarketIdOf, isIndexedSdk, IOMarketOutcomeAssetId, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import { gql } from "graphql-request"; import { useSdkv2 } from "../useSdkv2"; diff --git a/lib/hooks/trade.tsx b/lib/hooks/trade.tsx index 2c4a552d5..7a0c265cf 100644 --- a/lib/hooks/trade.tsx +++ b/lib/hooks/trade.tsx @@ -9,7 +9,7 @@ import { isRpcSdk, ScalarAssetId, ZTG, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import Decimal from "decimal.js"; import { calcInGivenOut, calcOutGivenIn } from "lib/math"; import { TradeType } from "lib/types"; diff --git a/lib/hooks/useCrossChainExtrinsic.ts b/lib/hooks/useCrossChainExtrinsic.ts index 23dbc80cf..24cfcc6d1 100644 --- a/lib/hooks/useCrossChainExtrinsic.ts +++ b/lib/hooks/useCrossChainExtrinsic.ts @@ -10,7 +10,7 @@ import { useSdkv2 } from "./useSdkv2"; import { decodeAddress, encodeAddress } from "@polkadot/keyring"; import { useQueryClient } from "@tanstack/react-query"; import { currencyBalanceRootKey } from "./queries/useCurrencyBalances"; -import { IOForeignAssetId, isRpcSdk } from "@zeitgeistpm/sdk-next"; +import { IOForeignAssetId, isRpcSdk } from "@zeitgeistpm/sdk"; import { useExtrinsicFee } from "./queries/useExtrinsicFee"; export const useCrossChainExtrinsic = ( diff --git a/lib/hooks/useExtrinsic.ts b/lib/hooks/useExtrinsic.ts index b1840639c..490d50af8 100644 --- a/lib/hooks/useExtrinsic.ts +++ b/lib/hooks/useExtrinsic.ts @@ -1,6 +1,6 @@ import { SubmittableExtrinsic } from "@polkadot/api/types"; import { ISubmittableResult } from "@polkadot/types/types"; -import { IOForeignAssetId, isRpcSdk } from "@zeitgeistpm/sdk-next"; +import { IOForeignAssetId, isRpcSdk } from "@zeitgeistpm/sdk"; import { useNotifications } from "lib/state/notifications"; import { useWallet } from "lib/state/wallet"; import { extrinsicCallback, signAndSend } from "lib/util/tx"; diff --git a/lib/hooks/useSdkv2.ts b/lib/hooks/useSdkv2.ts index 7663d172a..84517c106 100644 --- a/lib/hooks/useSdkv2.ts +++ b/lib/hooks/useSdkv2.ts @@ -1,4 +1,4 @@ -import { Context, create$, Sdk, ZeitgeistIpfs } from "@zeitgeistpm/sdk-next"; +import { Context, create$, Sdk, ZeitgeistIpfs } from "@zeitgeistpm/sdk"; import { endpointOptions as endpoints, graphQlEndpoint } from "lib/constants"; import { memoize } from "lodash-es"; import { useEffect, useState } from "react"; diff --git a/lib/hooks/useSubscribeBlockEvents.ts b/lib/hooks/useSubscribeBlockEvents.ts index dbd57c669..b8252afae 100644 --- a/lib/hooks/useSubscribeBlockEvents.ts +++ b/lib/hooks/useSubscribeBlockEvents.ts @@ -1,5 +1,5 @@ import { useQueryClient } from "@tanstack/react-query"; -import { isRpcSdk } from "@zeitgeistpm/sdk-next"; +import { isRpcSdk } from "@zeitgeistpm/sdk"; import { useEffect } from "react"; import { accountAssetBalanceRootKey } from "./queries/useAccountAssetBalances"; import { accountPoolAssetBalancesRootKey } from "./queries/useAccountPoolAssetBalances"; diff --git a/lib/state/chaintime.ts b/lib/state/chaintime.ts index 78747ca85..09f27f310 100644 --- a/lib/state/chaintime.ts +++ b/lib/state/chaintime.ts @@ -1,4 +1,4 @@ -import { isRpcSdk } from "@zeitgeistpm/sdk-next"; +import { isRpcSdk } from "@zeitgeistpm/sdk"; import { ChainTime } from "@zeitgeistpm/utility/dist/time"; import { atom, getDefaultStore, useAtom } from "jotai"; import { sdkAtom } from "lib/hooks/useSdkv2"; diff --git a/lib/state/delay-queue.ts b/lib/state/delay-queue.ts index 0994c82c6..096e7e132 100644 --- a/lib/state/delay-queue.ts +++ b/lib/state/delay-queue.ts @@ -1,4 +1,4 @@ -import { AssetId } from "@zeitgeistpm/sdk-next"; +import { AssetId } from "@zeitgeistpm/sdk"; import { atom, getDefaultStore, useAtom } from "jotai"; type QueueItem = { diff --git a/lib/state/market-creation/types/form.ts b/lib/state/market-creation/types/form.ts index 4dea6b7d8..f786e61a8 100644 --- a/lib/state/market-creation/types/form.ts +++ b/lib/state/market-creation/types/form.ts @@ -5,7 +5,7 @@ import { RpcContext, ZTG, swapFeeFromFloat, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import { KeyringPairOrExtSigner } from "@zeitgeistpm/rpc"; import { ChainTime } from "@zeitgeistpm/utility/dist/time"; import Decimal from "decimal.js"; diff --git a/lib/state/market-creation/util/tickers.ts b/lib/state/market-creation/util/tickers.ts index 37a4d1c11..725187a7f 100644 --- a/lib/state/market-creation/util/tickers.ts +++ b/lib/state/market-creation/util/tickers.ts @@ -1,4 +1,4 @@ -import { MarketMetadata } from "@zeitgeistpm/sdk-next"; +import { MarketMetadata } from "@zeitgeistpm/sdk"; import { Answers } from "../types/form"; /** diff --git a/lib/types/index.ts b/lib/types/index.ts index 4a72dff25..4c7341010 100644 --- a/lib/types/index.ts +++ b/lib/types/index.ts @@ -1,4 +1,4 @@ -import { ScalarRangeType } from "@zeitgeistpm/sdk-next"; +import { ScalarRangeType } from "@zeitgeistpm/sdk"; import { FullMarketFragment } from "@zeitgeistpm/indexer"; import { formatScalarOutcome } from "lib/util/format-scalar-outcome"; diff --git a/lib/util/assets-are-equal.ts b/lib/util/assets-are-equal.ts index 0a29ce70a..ff63b4c11 100644 --- a/lib/util/assets-are-equal.ts +++ b/lib/util/assets-are-equal.ts @@ -1,4 +1,4 @@ -import { AssetId } from "@zeitgeistpm/sdk-next"; +import { AssetId } from "@zeitgeistpm/sdk"; export const assetsAreEqual = (asset1?: AssetId, asset2?: AssetId) => { return JSON.stringify(asset1) === JSON.stringify(asset2); diff --git a/lib/util/assets.ts b/lib/util/assets.ts index 2a172bb5f..e514192ee 100644 --- a/lib/util/assets.ts +++ b/lib/util/assets.ts @@ -1,4 +1,4 @@ -import { getIndexOf, ZTG, MarketOutcomeAssetId } from "@zeitgeistpm/sdk-next"; +import { getIndexOf, ZTG, MarketOutcomeAssetId } from "@zeitgeistpm/sdk"; import Decimal from "decimal.js"; import { parseAssetIdString } from "./parse-asset-id"; diff --git a/lib/util/calc-price-history-start.ts b/lib/util/calc-price-history-start.ts index 213e16b1f..1fa4dfbb9 100644 --- a/lib/util/calc-price-history-start.ts +++ b/lib/util/calc-price-history-start.ts @@ -1,4 +1,4 @@ -import { MarketStatus } from "@zeitgeistpm/sdk-next"; +import { MarketStatus } from "@zeitgeistpm/sdk"; import { TimeFilter } from "components/ui/TimeFilters"; export const calcPriceHistoryStartDate = ( diff --git a/lib/util/format-scalar-outcome.ts b/lib/util/format-scalar-outcome.ts index 3c5d94297..bc8a3c5f5 100644 --- a/lib/util/format-scalar-outcome.ts +++ b/lib/util/format-scalar-outcome.ts @@ -1,6 +1,6 @@ import { Decimal } from "decimal.js"; import { ZTG } from "../constants"; -import type { ScalarRangeType } from "@zeitgeistpm/sdk-next"; +import type { ScalarRangeType } from "@zeitgeistpm/sdk"; export const formatScalarOutcome = ( outcome: string | number, diff --git a/lib/util/lookup-price.ts b/lib/util/lookup-price.ts index a75b31348..457a042eb 100644 --- a/lib/util/lookup-price.ts +++ b/lib/util/lookup-price.ts @@ -1,4 +1,4 @@ -import { IOForeignAssetId, parseAssetId } from "@zeitgeistpm/sdk-next"; +import { IOForeignAssetId, parseAssetId } from "@zeitgeistpm/sdk"; import Decimal from "decimal.js"; import { ForeignAssetPrices } from "lib/hooks/queries/useAssetUsdPrice"; diff --git a/lib/util/market-status-details.ts b/lib/util/market-status-details.ts index 0f5f4fbba..a2a20854c 100644 --- a/lib/util/market-status-details.ts +++ b/lib/util/market-status-details.ts @@ -1,5 +1,5 @@ -import type { ScalarRangeType } from "@zeitgeistpm/sdk-next"; -import { MarketStatus } from "@zeitgeistpm/sdk-next"; +import type { ScalarRangeType } from "@zeitgeistpm/sdk"; +import { MarketStatus } from "@zeitgeistpm/sdk"; import { formatScalarOutcome } from "./format-scalar-outcome"; import { MarketReport, diff --git a/lib/util/parse-asset-id.ts b/lib/util/parse-asset-id.ts index ab739c4f1..e3a4dfc0a 100644 --- a/lib/util/parse-asset-id.ts +++ b/lib/util/parse-asset-id.ts @@ -1,4 +1,4 @@ -import { AssetId, parseAssetId } from "@zeitgeistpm/sdk-next"; +import { AssetId, parseAssetId } from "@zeitgeistpm/sdk"; export const parseAssetIdString = (assetId?: string): AssetId | undefined => { return assetId ? parseAssetId(assetId).unrightOr(undefined) : undefined; diff --git a/package.json b/package.json index b9999410a..5a1517df8 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "@headlessui/tailwindcss": "^0.1.2", "@notionhq/client": "^2.2.3", "@plaiceholder/next": "^2.5.0", + "@polkadot/api": "^10.9.1", "@polkadot/extension-dapp": "^0.44.6", "@polkadot/ui-keyring": "^2.4.1", "@subsocial/grill-widget": "^0.0.5", @@ -40,7 +41,7 @@ "@zeitgeistpm/avatara-nft-sdk": "^1.3.1", "@zeitgeistpm/avatara-react": "^1.3.2", "@zeitgeistpm/avatara-util": "^1.2.0", - "@zeitgeistpm/sdk-next": "npm:@zeitgeistpm/sdk@2.36.1", + "@zeitgeistpm/sdk": "^2.36.1", "@zeitgeistpm/utility": "^2.20.0", "axios": "^0.21.4", "boring-avatars": "^1.6.1", diff --git a/pages/api/og/[marketId].ts b/pages/api/og/[marketId].ts index 96b010d9e..ab3cc1aa6 100644 --- a/pages/api/og/[marketId].ts +++ b/pages/api/og/[marketId].ts @@ -1,6 +1,6 @@ import { create } from "@zeitgeistpm/indexer"; import type { FullMarketFragment, PoolWhereInput } from "@zeitgeistpm/indexer"; -import { parseAssetId } from "@zeitgeistpm/sdk-next"; +import { parseAssetId } from "@zeitgeistpm/sdk"; import Decimal from "decimal.js"; import { graphQlEndpoint, ZTG } from "lib/constants"; import { diff --git a/pages/avatar/[address].tsx b/pages/avatar/[address].tsx index 7c0e2987c..c9c87c95f 100644 --- a/pages/avatar/[address].tsx +++ b/pages/avatar/[address].tsx @@ -10,7 +10,7 @@ // ZeitgeistAvatar, // } from "@zeitgeistpm/avatara-react"; // import { sanitizeIpfsUrl } from "@zeitgeistpm/avatara-util"; -// import { isRpcSdk } from "@zeitgeistpm/sdk-next"; +// import { isRpcSdk } from "@zeitgeistpm/sdk"; // import { tryCatch } from "@zeitgeistpm/utility/dist/either"; // import { fromNullable } from "@zeitgeistpm/utility/dist/option"; // import DiscordIcon from "components/icons/DiscordIcon"; diff --git a/pages/deposit.tsx b/pages/deposit.tsx index 97743911d..ea0e349f7 100644 --- a/pages/deposit.tsx +++ b/pages/deposit.tsx @@ -1,5 +1,5 @@ import { encodeAddress } from "@polkadot/keyring"; -import { ZTG } from "@zeitgeistpm/sdk-next"; +import { ZTG } from "@zeitgeistpm/sdk"; import CopyIcon from "components/ui/CopyIcon"; import FormTransactionButton from "components/ui/FormTransactionButton"; import Input from "components/ui/Input"; diff --git a/pages/index.tsx b/pages/index.tsx index 28b06e70c..8bb1566dd 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,5 +1,5 @@ import { GenericChainProperties } from "@polkadot/types"; -import { create, ZeitgeistIpfs } from "@zeitgeistpm/sdk-next"; +import { create, ZeitgeistIpfs } from "@zeitgeistpm/sdk"; import { BgBallGfx } from "components/front-page/BgBallFx"; import GettingStartedSection from "components/front-page/GettingStartedSection"; import { HeroBanner } from "components/front-page/HeroBanner"; diff --git a/pages/leaderboard/[period].tsx b/pages/leaderboard/[period].tsx index 6b0633973..1ad5808bb 100644 --- a/pages/leaderboard/[period].tsx +++ b/pages/leaderboard/[period].tsx @@ -13,7 +13,7 @@ import { IOScalarAssetId, parseAssetId, ZeitgeistIpfs, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import Avatar from "components/ui/Avatar"; import Table, { TableColumn, TableData } from "components/ui/Table"; import Decimal from "decimal.js"; diff --git a/pages/liquidity/[poolid].tsx b/pages/liquidity/[poolid].tsx index ee55749fa..0147ef657 100644 --- a/pages/liquidity/[poolid].tsx +++ b/pages/liquidity/[poolid].tsx @@ -1,4 +1,4 @@ -import { isIndexedData } from "@zeitgeistpm/sdk-next"; +import { isIndexedData } from "@zeitgeistpm/sdk"; import { MarketLiquiditySection } from "components/liquidity/MarketLiquiditySection"; import Pill from "components/ui/Pill"; import Decimal from "decimal.js"; diff --git a/pages/markets/[marketid].tsx b/pages/markets/[marketid].tsx index 671eb7d3e..4e7ef1536 100644 --- a/pages/markets/[marketid].tsx +++ b/pages/markets/[marketid].tsx @@ -4,7 +4,7 @@ import { MarketOutcomeAssetId, ScalarRangeType, parseAssetId, -} from "@zeitgeistpm/sdk-next"; +} from "@zeitgeistpm/sdk"; import { MarketLiquiditySection } from "components/liquidity/MarketLiquiditySection"; import DisputeResult from "components/markets/DisputeResult"; import { AddressDetails } from "components/markets/MarketAddresses"; diff --git a/pages/markets/await/[marketid].tsx b/pages/markets/await/[marketid].tsx index 87cb4e752..ab2e69d2d 100644 --- a/pages/markets/await/[marketid].tsx +++ b/pages/markets/await/[marketid].tsx @@ -1,5 +1,5 @@ import { PollingTimeout, poll } from "@zeitgeistpm/avatara-util"; -import { isIndexedSdk } from "@zeitgeistpm/sdk-next"; +import { isIndexedSdk } from "@zeitgeistpm/sdk"; import { useSdkv2 } from "lib/hooks/useSdkv2"; import { NextPage } from "next"; import { useRouter } from "next/router"; diff --git a/pages/portfolio/[address].tsx b/pages/portfolio/[address].tsx index bc003501d..edec974b1 100644 --- a/pages/portfolio/[address].tsx +++ b/pages/portfolio/[address].tsx @@ -1,5 +1,5 @@ import { Tab } from "@headlessui/react"; -import { getIndexOf } from "@zeitgeistpm/sdk-next"; +import { getIndexOf } from "@zeitgeistpm/sdk"; import BadgesList from "components/avatar/BadgesList"; import BondsTable from "components/portfolio/BondsTable"; import { PortfolioBreakdown } from "components/portfolio/Breakdown"; diff --git a/scripts/mts/getSpotPrices.mts b/scripts/mts/getSpotPrices.mts index c7e894e94..5864beaea 100644 --- a/scripts/mts/getSpotPrices.mts +++ b/scripts/mts/getSpotPrices.mts @@ -1,6 +1,6 @@ // run with the command e.g `ts-node -s --transpile-only --esm scripts/mts/getSpotPrices.mts 65 --at 1944439` import { Command } from "commander"; -import { ZeitgeistIpfs, createRpcContext } from "@zeitgeistpm/sdk-next"; +import { ZeitgeistIpfs, createRpcContext } from "@zeitgeistpm/sdk"; import Decimal from "decimal.js"; const program = new Command(); diff --git a/yarn.lock b/yarn.lock index 862c59f42..358911c57 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1450,6 +1450,15 @@ __metadata: languageName: node linkType: hard +"@noble/curves@npm:^1.2.0": + version: 1.2.0 + resolution: "@noble/curves@npm:1.2.0" + dependencies: + "@noble/hashes": 1.3.2 + checksum: bb798d7a66d8e43789e93bc3c2ddff91a1e19fdb79a99b86cd98f1e5eff0ee2024a2672902c2576ef3577b6f282f3b5c778bebd55761ddbb30e36bf275e83dd0 + languageName: node + linkType: hard + "@noble/hashes@npm:1.2.0": version: 1.2.0 resolution: "@noble/hashes@npm:1.2.0" @@ -1457,6 +1466,13 @@ __metadata: languageName: node linkType: hard +"@noble/hashes@npm:1.3.2, @noble/hashes@npm:^1.3.2": + version: 1.3.2 + resolution: "@noble/hashes@npm:1.3.2" + checksum: fe23536b436539d13f90e4b9be843cc63b1b17666a07634a2b1259dded6f490be3d050249e6af98076ea8f2ea0d56f578773c2197f2aa0eeaa5fba5bc18ba474 + languageName: node + linkType: hard + "@noble/secp256k1@npm:1.7.1": version: 1.7.1 resolution: "@noble/secp256k1@npm:1.7.1" @@ -1554,6 +1570,21 @@ __metadata: languageName: node linkType: hard +"@polkadot/api-augment@npm:10.9.1": + version: 10.9.1 + resolution: "@polkadot/api-augment@npm:10.9.1" + dependencies: + "@polkadot/api-base": 10.9.1 + "@polkadot/rpc-augment": 10.9.1 + "@polkadot/types": 10.9.1 + "@polkadot/types-augment": 10.9.1 + "@polkadot/types-codec": 10.9.1 + "@polkadot/util": ^12.3.1 + tslib: ^2.5.3 + checksum: b0aeed5ebf640c58a252a29a33f12d4c39d0dcdf10b875501012c3b4b05955ed8be85efbf75e17ad237a561e1171821979ffdddf7e6a64cb0806badb2752c190 + languageName: node + linkType: hard + "@polkadot/api-augment@npm:^9.11.2": version: 9.14.2 resolution: "@polkadot/api-augment@npm:9.14.2" @@ -1569,6 +1600,19 @@ __metadata: languageName: node linkType: hard +"@polkadot/api-base@npm:10.9.1": + version: 10.9.1 + resolution: "@polkadot/api-base@npm:10.9.1" + dependencies: + "@polkadot/rpc-core": 10.9.1 + "@polkadot/types": 10.9.1 + "@polkadot/util": ^12.3.1 + rxjs: ^7.8.1 + tslib: ^2.5.3 + checksum: a761f4ade747a295c16b7e6f24c1bb93e1736aa7fa9f1cb3c651c84d02a99cc62658e83326fa339882423966a55bf0046b74a69a1a4e4567c8d6c1c4db4eb306 + languageName: node + linkType: hard + "@polkadot/api-base@npm:9.14.2": version: 9.14.2 resolution: "@polkadot/api-base@npm:9.14.2" @@ -1582,6 +1626,49 @@ __metadata: languageName: node linkType: hard +"@polkadot/api-derive@npm:10.9.1": + version: 10.9.1 + resolution: "@polkadot/api-derive@npm:10.9.1" + dependencies: + "@polkadot/api": 10.9.1 + "@polkadot/api-augment": 10.9.1 + "@polkadot/api-base": 10.9.1 + "@polkadot/rpc-core": 10.9.1 + "@polkadot/types": 10.9.1 + "@polkadot/types-codec": 10.9.1 + "@polkadot/util": ^12.3.1 + "@polkadot/util-crypto": ^12.3.1 + rxjs: ^7.8.1 + tslib: ^2.5.3 + checksum: 072a43bcc55787beb6c29afe0f011c03cdde3a9b6ac38d972d0b13ff93a1e14198d769a926edfd324c3947735dd8c8fcb7a61629409322230fd8559e7c17a1d7 + languageName: node + linkType: hard + +"@polkadot/api@npm:10.9.1, @polkadot/api@npm:^10.9.1": + version: 10.9.1 + resolution: "@polkadot/api@npm:10.9.1" + dependencies: + "@polkadot/api-augment": 10.9.1 + "@polkadot/api-base": 10.9.1 + "@polkadot/api-derive": 10.9.1 + "@polkadot/keyring": ^12.3.1 + "@polkadot/rpc-augment": 10.9.1 + "@polkadot/rpc-core": 10.9.1 + "@polkadot/rpc-provider": 10.9.1 + "@polkadot/types": 10.9.1 + "@polkadot/types-augment": 10.9.1 + "@polkadot/types-codec": 10.9.1 + "@polkadot/types-create": 10.9.1 + "@polkadot/types-known": 10.9.1 + "@polkadot/util": ^12.3.1 + "@polkadot/util-crypto": ^12.3.1 + eventemitter3: ^5.0.1 + rxjs: ^7.8.1 + tslib: ^2.5.3 + checksum: 6b37d9bacf0599bb7c385ddefca929547299a6f1d242ce3215f8480672297c81ec30c251bc9aac3889c5956bd9ef3918d69364819861eec308f4aa347c08110d + languageName: node + linkType: hard + "@polkadot/extension-dapp@npm:^0.44.6": version: 0.44.9 resolution: "@polkadot/extension-dapp@npm:0.44.9" @@ -1628,6 +1715,20 @@ __metadata: languageName: node linkType: hard +"@polkadot/keyring@npm:^12.3.1": + version: 12.5.1 + resolution: "@polkadot/keyring@npm:12.5.1" + dependencies: + "@polkadot/util": 12.5.1 + "@polkadot/util-crypto": 12.5.1 + tslib: ^2.6.2 + peerDependencies: + "@polkadot/util": 12.5.1 + "@polkadot/util-crypto": 12.5.1 + checksum: d659e5980e4cd6b68f91448a817306666530c033410c713854547dbbbecacb7362346c3ada6c5ab9dc71437c3cf002f064d7db40d1588637b96e84ff8f35dcf4 + languageName: node + linkType: hard + "@polkadot/networks@npm:10.4.2, @polkadot/networks@npm:^10.4.2": version: 10.4.2 resolution: "@polkadot/networks@npm:10.4.2" @@ -1639,6 +1740,30 @@ __metadata: languageName: node linkType: hard +"@polkadot/networks@npm:12.5.1, @polkadot/networks@npm:^12.3.1": + version: 12.5.1 + resolution: "@polkadot/networks@npm:12.5.1" + dependencies: + "@polkadot/util": 12.5.1 + "@substrate/ss58-registry": ^1.43.0 + tslib: ^2.6.2 + checksum: f8c64684f6806365c1aded6ebca52432050cc8caacd067faf339b2f37497b63b13cebb689f7b0f9c62a890566383cf1931552da82815cc52baa2166fb1772a43 + languageName: node + linkType: hard + +"@polkadot/rpc-augment@npm:10.9.1": + version: 10.9.1 + resolution: "@polkadot/rpc-augment@npm:10.9.1" + dependencies: + "@polkadot/rpc-core": 10.9.1 + "@polkadot/types": 10.9.1 + "@polkadot/types-codec": 10.9.1 + "@polkadot/util": ^12.3.1 + tslib: ^2.5.3 + checksum: 4f7b090be6d88ef6a56679a80da856bf007994e2142e16fbac6030132789b5a2411421650935ed4b18334afca399edfc0387135731836c6d9f8420acf510f11b + languageName: node + linkType: hard + "@polkadot/rpc-augment@npm:9.14.2": version: 9.14.2 resolution: "@polkadot/rpc-augment@npm:9.14.2" @@ -1652,6 +1777,20 @@ __metadata: languageName: node linkType: hard +"@polkadot/rpc-core@npm:10.9.1": + version: 10.9.1 + resolution: "@polkadot/rpc-core@npm:10.9.1" + dependencies: + "@polkadot/rpc-augment": 10.9.1 + "@polkadot/rpc-provider": 10.9.1 + "@polkadot/types": 10.9.1 + "@polkadot/util": ^12.3.1 + rxjs: ^7.8.1 + tslib: ^2.5.3 + checksum: 538a207f5d321b4b18b0580da438598dd78e496dbc7069a776abcc39ede36903981ba2b9897eea73ecfe2f48a4d0cbd5b5cd738b3184f5c333709e6f4603f22a + languageName: node + linkType: hard + "@polkadot/rpc-core@npm:9.14.2": version: 9.14.2 resolution: "@polkadot/rpc-core@npm:9.14.2" @@ -1666,6 +1805,30 @@ __metadata: languageName: node linkType: hard +"@polkadot/rpc-provider@npm:10.9.1": + version: 10.9.1 + resolution: "@polkadot/rpc-provider@npm:10.9.1" + dependencies: + "@polkadot/keyring": ^12.3.1 + "@polkadot/types": 10.9.1 + "@polkadot/types-support": 10.9.1 + "@polkadot/util": ^12.3.1 + "@polkadot/util-crypto": ^12.3.1 + "@polkadot/x-fetch": ^12.3.1 + "@polkadot/x-global": ^12.3.1 + "@polkadot/x-ws": ^12.3.1 + "@substrate/connect": 0.7.26 + eventemitter3: ^5.0.1 + mock-socket: ^9.2.1 + nock: ^13.3.1 + tslib: ^2.5.3 + dependenciesMeta: + "@substrate/connect": + optional: true + checksum: 4521ba64a1e69ed323910796a4598755e8101704aae3be33b6c363be4ebb9ea1a99ced17b8cd9fa3ab15abf5900e1055279f532f47b8472e8a143a299bfa046d + languageName: node + linkType: hard + "@polkadot/rpc-provider@npm:9.14.2, @polkadot/rpc-provider@npm:^9.14.2": version: 9.14.2 resolution: "@polkadot/rpc-provider@npm:9.14.2" @@ -1690,6 +1853,18 @@ __metadata: languageName: node linkType: hard +"@polkadot/types-augment@npm:10.9.1": + version: 10.9.1 + resolution: "@polkadot/types-augment@npm:10.9.1" + dependencies: + "@polkadot/types": 10.9.1 + "@polkadot/types-codec": 10.9.1 + "@polkadot/util": ^12.3.1 + tslib: ^2.5.3 + checksum: d643f83ab0a9498267037d95b878fa4e3b0087882195c3bd609038e8c934a092d9c82f7164ac97989305805aabe0d9186736c50a372498c81c22b3d7f4cfcccb + languageName: node + linkType: hard + "@polkadot/types-augment@npm:9.14.2": version: 9.14.2 resolution: "@polkadot/types-augment@npm:9.14.2" @@ -1702,6 +1877,17 @@ __metadata: languageName: node linkType: hard +"@polkadot/types-codec@npm:10.9.1": + version: 10.9.1 + resolution: "@polkadot/types-codec@npm:10.9.1" + dependencies: + "@polkadot/util": ^12.3.1 + "@polkadot/x-bigint": ^12.3.1 + tslib: ^2.5.3 + checksum: ac11b770fa4328f55daf6dd78fc8fc4d6906fb0d4b2bf92eaece58332c74f2b178d598a310a6dd068c72856acefddf5f7d23cac56991fa12f61d6853fb73d582 + languageName: node + linkType: hard + "@polkadot/types-codec@npm:9.14.2": version: 9.14.2 resolution: "@polkadot/types-codec@npm:9.14.2" @@ -1713,6 +1899,17 @@ __metadata: languageName: node linkType: hard +"@polkadot/types-create@npm:10.9.1": + version: 10.9.1 + resolution: "@polkadot/types-create@npm:10.9.1" + dependencies: + "@polkadot/types-codec": 10.9.1 + "@polkadot/util": ^12.3.1 + tslib: ^2.5.3 + checksum: 43f8fbd70a7891d6b49f1edb00b4a918c21924f2c1e44eb81ef7c9327e1fcc7eac65dbc2a9d0e3ba49079fdddda5498115e47f5fd99ec2a91f79c7f305bf553a + languageName: node + linkType: hard + "@polkadot/types-create@npm:9.14.2": version: 9.14.2 resolution: "@polkadot/types-create@npm:9.14.2" @@ -1724,6 +1921,30 @@ __metadata: languageName: node linkType: hard +"@polkadot/types-known@npm:10.9.1": + version: 10.9.1 + resolution: "@polkadot/types-known@npm:10.9.1" + dependencies: + "@polkadot/networks": ^12.3.1 + "@polkadot/types": 10.9.1 + "@polkadot/types-codec": 10.9.1 + "@polkadot/types-create": 10.9.1 + "@polkadot/util": ^12.3.1 + tslib: ^2.5.3 + checksum: 8a3dd0dead1759112b9011c5ff47bf9fa0f5a00d0d5cba841d724494a9434a2f565fad8ab654ae8cc3949a10c28f3966034bfc23e493b7cc373d3532de508953 + languageName: node + linkType: hard + +"@polkadot/types-support@npm:10.9.1": + version: 10.9.1 + resolution: "@polkadot/types-support@npm:10.9.1" + dependencies: + "@polkadot/util": ^12.3.1 + tslib: ^2.5.3 + checksum: f5df33f215f529c33d4fd7ad7d6877a4567954488971c2986da416b6578ccb6d5c6eeadab4602abe0e3ce17373cdd6de0ce6f09529852b6e2fd6bc28b9183f9b + languageName: node + linkType: hard + "@polkadot/types-support@npm:9.14.2": version: 9.14.2 resolution: "@polkadot/types-support@npm:9.14.2" @@ -1734,6 +1955,22 @@ __metadata: languageName: node linkType: hard +"@polkadot/types@npm:10.9.1": + version: 10.9.1 + resolution: "@polkadot/types@npm:10.9.1" + dependencies: + "@polkadot/keyring": ^12.3.1 + "@polkadot/types-augment": 10.9.1 + "@polkadot/types-codec": 10.9.1 + "@polkadot/types-create": 10.9.1 + "@polkadot/util": ^12.3.1 + "@polkadot/util-crypto": ^12.3.1 + rxjs: ^7.8.1 + tslib: ^2.5.3 + checksum: c9b0873b52f33c5d7913bc1e474c67d797411ac592c10af987dfecfee7480aeda02b9fc100ff506bc8af704a7fc239162a8ec7eec580e2e7a62ac7f7b95f3900 + languageName: node + linkType: hard + "@polkadot/types@npm:9.14.2, @polkadot/types@npm:^9.14.2": version: 9.14.2 resolution: "@polkadot/types@npm:9.14.2" @@ -1807,6 +2044,26 @@ __metadata: languageName: node linkType: hard +"@polkadot/util-crypto@npm:12.5.1, @polkadot/util-crypto@npm:^12.3.1": + version: 12.5.1 + resolution: "@polkadot/util-crypto@npm:12.5.1" + dependencies: + "@noble/curves": ^1.2.0 + "@noble/hashes": ^1.3.2 + "@polkadot/networks": 12.5.1 + "@polkadot/util": 12.5.1 + "@polkadot/wasm-crypto": ^7.2.2 + "@polkadot/wasm-util": ^7.2.2 + "@polkadot/x-bigint": 12.5.1 + "@polkadot/x-randomvalues": 12.5.1 + "@scure/base": ^1.1.3 + tslib: ^2.6.2 + peerDependencies: + "@polkadot/util": 12.5.1 + checksum: 4efb5ca6e48f7457d8dcfa02ac9f581ce23a90ba9e72c8f6fd7649296e92dcb3dfa3d2bdd0b5ed68b81bf15e32aabef34f60d47851249d8859dba7ebeb63501f + languageName: node + linkType: hard + "@polkadot/util@npm:10.4.2, @polkadot/util@npm:^10.4.2": version: 10.4.2 resolution: "@polkadot/util@npm:10.4.2" @@ -1822,6 +2079,21 @@ __metadata: languageName: node linkType: hard +"@polkadot/util@npm:12.5.1, @polkadot/util@npm:^12.3.1": + version: 12.5.1 + resolution: "@polkadot/util@npm:12.5.1" + dependencies: + "@polkadot/x-bigint": 12.5.1 + "@polkadot/x-global": 12.5.1 + "@polkadot/x-textdecoder": 12.5.1 + "@polkadot/x-textencoder": 12.5.1 + "@types/bn.js": ^5.1.1 + bn.js: ^5.2.1 + tslib: ^2.6.2 + checksum: 955d41c01cb3c7da72c4f5f8faed13e1af1fa9603a3a1dd9f282eb69b5ebbffb889e76c595d1252ff5f9665cb3c55f1a96f908b020dc79356f92b2d5ce1aa81e + languageName: node + linkType: hard + "@polkadot/wasm-bridge@npm:6.4.1": version: 6.4.1 resolution: "@polkadot/wasm-bridge@npm:6.4.1" @@ -1834,6 +2106,19 @@ __metadata: languageName: node linkType: hard +"@polkadot/wasm-bridge@npm:7.2.2": + version: 7.2.2 + resolution: "@polkadot/wasm-bridge@npm:7.2.2" + dependencies: + "@polkadot/wasm-util": 7.2.2 + tslib: ^2.6.1 + peerDependencies: + "@polkadot/util": "*" + "@polkadot/x-randomvalues": "*" + checksum: b998b21bca963699c2958de0558bad83d19ca72922b7ca74beb99b8c418bdc4be7af86f7ea231b3224de55eb8ec59e0626642d393fc90192659cccaf346d5d2b + languageName: node + linkType: hard + "@polkadot/wasm-crypto-asmjs@npm:6.4.1": version: 6.4.1 resolution: "@polkadot/wasm-crypto-asmjs@npm:6.4.1" @@ -1845,6 +2130,17 @@ __metadata: languageName: node linkType: hard +"@polkadot/wasm-crypto-asmjs@npm:7.2.2": + version: 7.2.2 + resolution: "@polkadot/wasm-crypto-asmjs@npm:7.2.2" + dependencies: + tslib: ^2.6.1 + peerDependencies: + "@polkadot/util": "*" + checksum: 2eba52949b51adfa1e8183d406f40b935cdea1a3189994529febd9db4f1abf5f853782e2c15dad7ab0f2dd8641b3dbf40b221c0462b6a29ac11c38e8a70a8a5b + languageName: node + linkType: hard + "@polkadot/wasm-crypto-init@npm:6.4.1": version: 6.4.1 resolution: "@polkadot/wasm-crypto-init@npm:6.4.1" @@ -1860,6 +2156,22 @@ __metadata: languageName: node linkType: hard +"@polkadot/wasm-crypto-init@npm:7.2.2": + version: 7.2.2 + resolution: "@polkadot/wasm-crypto-init@npm:7.2.2" + dependencies: + "@polkadot/wasm-bridge": 7.2.2 + "@polkadot/wasm-crypto-asmjs": 7.2.2 + "@polkadot/wasm-crypto-wasm": 7.2.2 + "@polkadot/wasm-util": 7.2.2 + tslib: ^2.6.1 + peerDependencies: + "@polkadot/util": "*" + "@polkadot/x-randomvalues": "*" + checksum: 75e4cc6cfecef13942397c0b0cbcd2ebf8534589b0a22104df6352908efbdc78e6fa42df3ce1660c1b267c8b7c40667a42c0d986a7a3bc4a2b9ea17ba97608af + languageName: node + linkType: hard + "@polkadot/wasm-crypto-wasm@npm:6.4.1": version: 6.4.1 resolution: "@polkadot/wasm-crypto-wasm@npm:6.4.1" @@ -1872,6 +2184,18 @@ __metadata: languageName: node linkType: hard +"@polkadot/wasm-crypto-wasm@npm:7.2.2": + version: 7.2.2 + resolution: "@polkadot/wasm-crypto-wasm@npm:7.2.2" + dependencies: + "@polkadot/wasm-util": 7.2.2 + tslib: ^2.6.1 + peerDependencies: + "@polkadot/util": "*" + checksum: e3d0aeb59fb7e5d3d25a256ed57c4e05895e9d7e29cb22214d9b59ff6e400f25b0c5758f77a0513befd99ef33051b43bbff3d1def978e87668aa74f3f8799c0b + languageName: node + linkType: hard + "@polkadot/wasm-crypto@npm:^6.3.1, @polkadot/wasm-crypto@npm:^6.4.1": version: 6.4.1 resolution: "@polkadot/wasm-crypto@npm:6.4.1" @@ -1889,6 +2213,23 @@ __metadata: languageName: node linkType: hard +"@polkadot/wasm-crypto@npm:^7.2.2": + version: 7.2.2 + resolution: "@polkadot/wasm-crypto@npm:7.2.2" + dependencies: + "@polkadot/wasm-bridge": 7.2.2 + "@polkadot/wasm-crypto-asmjs": 7.2.2 + "@polkadot/wasm-crypto-init": 7.2.2 + "@polkadot/wasm-crypto-wasm": 7.2.2 + "@polkadot/wasm-util": 7.2.2 + tslib: ^2.6.1 + peerDependencies: + "@polkadot/util": "*" + "@polkadot/x-randomvalues": "*" + checksum: 25710154c1a25aea59a8cdba4cfe051249e83b86cbc0869be7b0680c86f2841131f7df76881d422fb4d179b9037320957e725bc50546e63273bc11b85751b5a6 + languageName: node + linkType: hard + "@polkadot/wasm-util@npm:6.4.1": version: 6.4.1 resolution: "@polkadot/wasm-util@npm:6.4.1" @@ -1900,6 +2241,17 @@ __metadata: languageName: node linkType: hard +"@polkadot/wasm-util@npm:7.2.2, @polkadot/wasm-util@npm:^7.2.2": + version: 7.2.2 + resolution: "@polkadot/wasm-util@npm:7.2.2" + dependencies: + tslib: ^2.6.1 + peerDependencies: + "@polkadot/util": "*" + checksum: b1ad387e5b2726183e1c141ac59f9e6e722d9c1e896dbe0069fb5ce46d30c3517f07b36c840c1d82d23256e111a3697ba3015e53073858e8e05ab3d0cbdbf05e + languageName: node + linkType: hard + "@polkadot/x-bigint@npm:10.4.2, @polkadot/x-bigint@npm:^10.4.2": version: 10.4.2 resolution: "@polkadot/x-bigint@npm:10.4.2" @@ -1910,6 +2262,16 @@ __metadata: languageName: node linkType: hard +"@polkadot/x-bigint@npm:12.5.1, @polkadot/x-bigint@npm:^12.3.1": + version: 12.5.1 + resolution: "@polkadot/x-bigint@npm:12.5.1" + dependencies: + "@polkadot/x-global": 12.5.1 + tslib: ^2.6.2 + checksum: 295d00b17860196c43ac4957ffb052ca68bb4319990876238e3f0925ca6ca9106810204136315491116a11a277d8a1e1fae65cc43a168505ee5a69a27404d2e0 + languageName: node + linkType: hard + "@polkadot/x-fetch@npm:^10.4.2": version: 10.4.2 resolution: "@polkadot/x-fetch@npm:10.4.2" @@ -1922,6 +2284,17 @@ __metadata: languageName: node linkType: hard +"@polkadot/x-fetch@npm:^12.3.1": + version: 12.5.1 + resolution: "@polkadot/x-fetch@npm:12.5.1" + dependencies: + "@polkadot/x-global": 12.5.1 + node-fetch: ^3.3.2 + tslib: ^2.6.2 + checksum: 26b24b09f9074c181f53f13ea17a1389e823b262a956a28fddf609ba7d177a1cde3cd4db28e8e38320b207adcc675ac868dadfaeafe9cf3998a3861f02ee43d7 + languageName: node + linkType: hard + "@polkadot/x-global@npm:10.4.2, @polkadot/x-global@npm:^10.4.2": version: 10.4.2 resolution: "@polkadot/x-global@npm:10.4.2" @@ -1931,6 +2304,15 @@ __metadata: languageName: node linkType: hard +"@polkadot/x-global@npm:12.5.1, @polkadot/x-global@npm:^12.3.1": + version: 12.5.1 + resolution: "@polkadot/x-global@npm:12.5.1" + dependencies: + tslib: ^2.6.2 + checksum: d45e3d6096674b7495992c6e45cf1a284db545c16107ba9adae241d6aefe13c27adfaf93d58a3079e6a6b63acb221eb3181c7f55dc34124b24b542154724c506 + languageName: node + linkType: hard + "@polkadot/x-randomvalues@npm:10.4.2": version: 10.4.2 resolution: "@polkadot/x-randomvalues@npm:10.4.2" @@ -1941,6 +2323,19 @@ __metadata: languageName: node linkType: hard +"@polkadot/x-randomvalues@npm:12.5.1": + version: 12.5.1 + resolution: "@polkadot/x-randomvalues@npm:12.5.1" + dependencies: + "@polkadot/x-global": 12.5.1 + tslib: ^2.6.2 + peerDependencies: + "@polkadot/util": 12.5.1 + "@polkadot/wasm-util": "*" + checksum: 52ee4b4206a98cac9e97e3d194db01fb4a540046672784442926478eaa2b2a74cebae59d10432671f544d72df5d623aedf57c301bcf447a4c72688ec3cb82fd5 + languageName: node + linkType: hard + "@polkadot/x-textdecoder@npm:10.4.2": version: 10.4.2 resolution: "@polkadot/x-textdecoder@npm:10.4.2" @@ -1951,6 +2346,16 @@ __metadata: languageName: node linkType: hard +"@polkadot/x-textdecoder@npm:12.5.1": + version: 12.5.1 + resolution: "@polkadot/x-textdecoder@npm:12.5.1" + dependencies: + "@polkadot/x-global": 12.5.1 + tslib: ^2.6.2 + checksum: 202a9e216e9b89cc74012fa3f6c96eeb368dc3e6fa3c943f28c37c20941a6c678506cbc136946e9ff100123aa43846eab7765af074de94dfdd23f4ce2242c794 + languageName: node + linkType: hard + "@polkadot/x-textencoder@npm:10.4.2": version: 10.4.2 resolution: "@polkadot/x-textencoder@npm:10.4.2" @@ -1961,6 +2366,16 @@ __metadata: languageName: node linkType: hard +"@polkadot/x-textencoder@npm:12.5.1": + version: 12.5.1 + resolution: "@polkadot/x-textencoder@npm:12.5.1" + dependencies: + "@polkadot/x-global": 12.5.1 + tslib: ^2.6.2 + checksum: 7a8d99d203cbd9537e55405d737667ae8cd9ad40a9e3de52f2ef7580a23d27ebf7f7c52da4e0eca6ca34dc97aae33a97bab36afb54aaa7714f54a31931f94113 + languageName: node + linkType: hard + "@polkadot/x-ws@npm:^10.4.2": version: 10.4.2 resolution: "@polkadot/x-ws@npm:10.4.2" @@ -1973,6 +2388,17 @@ __metadata: languageName: node linkType: hard +"@polkadot/x-ws@npm:^12.3.1": + version: 12.5.1 + resolution: "@polkadot/x-ws@npm:12.5.1" + dependencies: + "@polkadot/x-global": 12.5.1 + tslib: ^2.6.2 + ws: ^8.14.1 + checksum: 839e82ab4bf013d17a356e2f10a42ba2ecf88f4e432985241e785416aeb6434c0e7c897b09aeeab23f5d27b27ef0dfe65eda85293c7a08f52d0774bb1b23704b + languageName: node + linkType: hard + "@protobufjs/aspromise@npm:^1.1.1, @protobufjs/aspromise@npm:^1.1.2": version: 1.1.2 resolution: "@protobufjs/aspromise@npm:1.1.2" @@ -2060,6 +2486,13 @@ __metadata: languageName: node linkType: hard +"@scure/base@npm:^1.1.3": + version: 1.1.3 + resolution: "@scure/base@npm:1.1.3" + checksum: 1606ab8a4db898cb3a1ada16c15437c3bce4e25854fadc8eb03ae93cbbbac1ed90655af4b0be3da37e12056fef11c0374499f69b9e658c9e5b7b3e06353c630c + languageName: node + linkType: hard + "@shuding/opentype.js@npm:1.4.0-beta.0": version: 1.4.0-beta.0 resolution: "@shuding/opentype.js@npm:1.4.0-beta.0" @@ -2145,6 +2578,17 @@ __metadata: languageName: node linkType: hard +"@substrate/connect@npm:0.7.26": + version: 0.7.26 + resolution: "@substrate/connect@npm:0.7.26" + dependencies: + "@substrate/connect-extension-protocol": ^1.0.1 + eventemitter3: ^4.0.7 + smoldot: 1.0.4 + checksum: 3179d241f073318d5973deb61c9c8d9b89ae28909a594b6b9fbcdfffd030a70ba58e8428eaa9d72484810bad10c93de1ad9c440b878d0fcfaaf4559d2e6f4502 + languageName: node + linkType: hard + "@substrate/smoldot-light@npm:0.7.9": version: 0.7.9 resolution: "@substrate/smoldot-light@npm:0.7.9" @@ -2162,6 +2606,13 @@ __metadata: languageName: node linkType: hard +"@substrate/ss58-registry@npm:^1.43.0": + version: 1.43.0 + resolution: "@substrate/ss58-registry@npm:1.43.0" + checksum: b2ecfd7365b946be2db7e2c5fa1f9136ff840bb2b8e6ffac0f48cd83f01a95c8a0fee1bb744255591bfc1f76766cd834182cde8cbd96e7849549d189c5812b3c + languageName: node + linkType: hard + "@swc/helpers@npm:0.5.1": version: 0.5.1 resolution: "@swc/helpers@npm:0.5.1" @@ -2848,14 +3299,14 @@ __metadata: languageName: node linkType: hard -"@zeitgeistpm/augment-api@npm:^2.14.0": - version: 2.14.0 - resolution: "@zeitgeistpm/augment-api@npm:2.14.0" +"@zeitgeistpm/augment-api@npm:^2.16.0": + version: 2.16.0 + resolution: "@zeitgeistpm/augment-api@npm:2.16.0" peerDependencies: "@polkadot/api-base": "*" "@polkadot/rpc-core": "*" "@polkadot/types": "*" - checksum: 52f49929ceff972f8d3a0261c284d421ba54b1dc4a49bf2ab88836f27ae61f8f06f603aab45a0ef08c611ea2ed82b076cabdd352f598566cdee173af8b5a9e8b + checksum: bcb96d5636300bbc17f0d8933dfbd7dbfa90357abbe2b3bb100bfe84fcc8196380682186bbed311be59852defe5804cea81eb037d1f7903fdcf375581dc06188 languageName: node linkType: hard @@ -2962,40 +3413,40 @@ __metadata: languageName: node linkType: hard -"@zeitgeistpm/indexer@npm:^3.7.1": - version: 3.8.0 - resolution: "@zeitgeistpm/indexer@npm:3.8.0" +"@zeitgeistpm/indexer@npm:^3.9.0": + version: 3.9.0 + resolution: "@zeitgeistpm/indexer@npm:3.9.0" dependencies: graphql: ^16.6.0 graphql-request: ^5.0.0 graphql-tag: ^2.12.6 - checksum: 657075d4572cadd1cf51b23f55921e0150e0fb42bbeba504d32a2979a53ea1b18671d2e1998763f339e04e5f4372b63ec4c236ae61bb66025afcd1489cadc5f2 + checksum: b49ff76cd0797145842e3b158dc947a1532f5ee4f8335923229184b4a4103e29f4f87370197bf013d24c7e98839fbf99a783e0c7d6b708782c4112eebdb99e01 languageName: node linkType: hard -"@zeitgeistpm/rpc@npm:^2.10.1": - version: 2.10.1 - resolution: "@zeitgeistpm/rpc@npm:2.10.1" +"@zeitgeistpm/rpc@npm:^2.11.0": + version: 2.11.0 + resolution: "@zeitgeistpm/rpc@npm:2.11.0" dependencies: - "@zeitgeistpm/augment-api": ^2.14.0 - "@zeitgeistpm/utility": ^2.20.0 + "@zeitgeistpm/augment-api": ^2.16.0 + "@zeitgeistpm/utility": ^2.21.0 peerDependencies: "@polkadot/api": "*" "@polkadot/keyring": "*" "@polkadot/types": "*" - checksum: 20a1200f1cdbea4d244843510ce34456e1ba9655126a19f95685f24b61dea37b5b6ead5964e346644e6f91a3771b2246b7de3538aac4289c51802b9ba76366c1 + checksum: 4454dbc7e68b7625e0d221b0d174e9c79af1b23f2cea71dd74d04c9460ea774779f83581f17bd3335fc31a35e80cfceadabd1ced99484c64eb954ac6060dad78 languageName: node linkType: hard -"@zeitgeistpm/sdk-next@npm:@zeitgeistpm/sdk@2.36.1": - version: 2.36.1 - resolution: "@zeitgeistpm/sdk@npm:2.36.1" +"@zeitgeistpm/sdk@npm:^2.36.1": + version: 2.38.0 + resolution: "@zeitgeistpm/sdk@npm:2.38.0" dependencies: - "@zeitgeistpm/augment-api": ^2.14.0 - "@zeitgeistpm/indexer": ^3.7.1 - "@zeitgeistpm/rpc": ^2.10.1 - "@zeitgeistpm/utility": ^2.20.0 - "@zeitgeistpm/web3.storage": ^2.11.0 + "@zeitgeistpm/augment-api": ^2.16.0 + "@zeitgeistpm/indexer": ^3.9.0 + "@zeitgeistpm/rpc": ^2.11.0 + "@zeitgeistpm/utility": ^2.21.0 + "@zeitgeistpm/web3.storage": ^2.12.0 cids: ^1.1.9 decimal.js: ^10.4.3 lodash-es: ^4.17.21 @@ -3008,7 +3459,7 @@ __metadata: "@polkadot/api": "*" "@polkadot/types": "*" "@polkadot/util": "*" - checksum: a02da5598a1fd5ada743fad7690388fed1ce7c2fce05b59852d396961afc76f5f8013f4b815b792ffa7e875a8cd6aa6feab1f5afa8340f9601ca74f464406fd4 + checksum: c15395afb1aeb482f66dc5fe3cb824ee529348fe8204de68137f8d7c37b20f7b42d8a58ce14c07381d77fec044031dbebed9e2bd939a68f32fa466639e36ec72 languageName: node linkType: hard @@ -3040,6 +3491,7 @@ __metadata: "@notionhq/client": ^2.2.3 "@plaiceholder/next": ^2.5.0 "@playwright/test": ^1.28.1 + "@polkadot/api": ^10.9.1 "@polkadot/extension-dapp": ^0.44.6 "@polkadot/ui-keyring": ^2.4.1 "@polkadot/wasm-crypto": ^6.3.1 @@ -3067,7 +3519,7 @@ __metadata: "@zeitgeistpm/avatara-nft-sdk": ^1.3.1 "@zeitgeistpm/avatara-react": ^1.3.2 "@zeitgeistpm/avatara-util": ^1.2.0 - "@zeitgeistpm/sdk-next": "npm:@zeitgeistpm/sdk@2.36.1" + "@zeitgeistpm/sdk": ^2.36.1 "@zeitgeistpm/utility": ^2.20.0 autoprefixer: 10.2.5 axios: ^0.21.4 @@ -3152,11 +3604,27 @@ __metadata: languageName: node linkType: hard -"@zeitgeistpm/web3.storage@npm:^2.11.0": - version: 2.11.0 - resolution: "@zeitgeistpm/web3.storage@npm:2.11.0" +"@zeitgeistpm/utility@npm:^2.21.0": + version: 2.21.0 + resolution: "@zeitgeistpm/utility@npm:2.21.0" dependencies: - "@zeitgeistpm/utility": ^2.20.0 + decimal.js: ^10.4.3 + lodash.omit: ^4.5.0 + ms: ^2.1.3 + rxjs: ^7.2.0 + peerDependencies: + "@polkadot/api": "*" + "@polkadot/types": "*" + "@polkadot/util": "*" + checksum: c8625436b0f87f7d0591e955ed4625a26dd27166ce4a380982a7e99bad9bf09f090f793f8aae9bb10ef3c55c49eff35b251dcf0249a26c1e6ddea7532385b5d8 + languageName: node + linkType: hard + +"@zeitgeistpm/web3.storage@npm:^2.12.0": + version: 2.12.0 + resolution: "@zeitgeistpm/web3.storage@npm:2.12.0" + dependencies: + "@zeitgeistpm/utility": ^2.21.0 cids: ^1.1.9 ipfs-http-client: ^60.0.0 ipfs-only-hash: ^4.0.0 @@ -3165,7 +3633,7 @@ __metadata: up: ^1.0.2 peerDependencies: "@polkadot/util": "*" - checksum: dae2a1df0549a9708e25c9ca02f5b506734672f001255be4d45aa196e133db66ce0ed1aa675c471d0b8e12df7d0cddf9dbe3e3c8921d9ab9c604e3d04ed5a591 + checksum: 2106b48173ce0e6c2c2c3919fd059c9e127114d4fc4bee3d73315bd9d5cc0a4f54753430f58c15fc3391e1a50a5985fba2ee704e89dbe1905088e94c089f63f2 languageName: node linkType: hard @@ -5292,6 +5760,13 @@ __metadata: languageName: node linkType: hard +"eventemitter3@npm:^5.0.1": + version: 5.0.1 + resolution: "eventemitter3@npm:5.0.1" + checksum: 543d6c858ab699303c3c32e0f0f47fc64d360bf73c3daf0ac0b5079710e340d6fe9f15487f94e66c629f5f82cd1a8678d692f3dbb6f6fcd1190e1b97fcad36f8 + languageName: node + linkType: hard + "events@npm:^3.3.0": version: 3.3.0 resolution: "events@npm:3.3.0" @@ -8858,6 +9333,18 @@ __metadata: languageName: node linkType: hard +"nock@npm:^13.3.1": + version: 13.3.3 + resolution: "nock@npm:13.3.3" + dependencies: + debug: ^4.1.0 + json-stringify-safe: ^5.0.1 + lodash: ^4.17.21 + propagate: ^2.0.0 + checksum: e3e4f0fb777ac63d74f89bbb7aebe8e815b891b64ac71983d91686f725fdab856fe189cf2fe23d4add9f5dd5da53f3568106a61116a771ce0f4ed0f5ad7b035b + languageName: node + linkType: hard + "node-abi@npm:^3.3.0": version: 3.33.0 resolution: "node-abi@npm:3.33.0" @@ -8940,6 +9427,17 @@ __metadata: languageName: node linkType: hard +"node-fetch@npm:^3.3.2": + version: 3.3.2 + resolution: "node-fetch@npm:3.3.2" + dependencies: + data-uri-to-buffer: ^4.0.0 + fetch-blob: ^3.1.4 + formdata-polyfill: ^4.0.10 + checksum: 06a04095a2ddf05b0830a0d5302699704d59bda3102894ea64c7b9d4c865ecdff2d90fd042df7f5bc40337266961cb6183dcc808ea4f3000d024f422b462da92 + languageName: node + linkType: hard + "node-forge@npm:^0.10.0": version: 0.10.0 resolution: "node-forge@npm:0.10.0" @@ -10607,6 +11105,15 @@ __metadata: languageName: node linkType: hard +"rxjs@npm:^7.8.1": + version: 7.8.1 + resolution: "rxjs@npm:7.8.1" + dependencies: + tslib: ^2.1.0 + checksum: de4b53db1063e618ec2eca0f7965d9137cabe98cf6be9272efe6c86b47c17b987383df8574861bcced18ebd590764125a901d5506082be84a8b8e364bf05f119 + languageName: node + linkType: hard + "safe-buffer@npm:^5.0.1, safe-buffer@npm:~5.2.0": version: 5.2.1 resolution: "safe-buffer@npm:5.2.1" @@ -10844,6 +11351,16 @@ __metadata: languageName: node linkType: hard +"smoldot@npm:1.0.4": + version: 1.0.4 + resolution: "smoldot@npm:1.0.4" + dependencies: + pako: ^2.0.4 + ws: ^8.8.1 + checksum: 81ecc38b98f7ac4dd093753e85956262608dca3c8a288c20a25fe1762a6afcdbe6f3622ea30a346df3f4145e0900ef0595e56e96e9e0de83c59f0649d1ab4786 + languageName: node + linkType: hard + "socks-proxy-agent@npm:^7.0.0": version: 7.0.0 resolution: "socks-proxy-agent@npm:7.0.0" @@ -11572,6 +12089,13 @@ __metadata: languageName: node linkType: hard +"tslib@npm:^2.5.3, tslib@npm:^2.6.1, tslib@npm:^2.6.2": + version: 2.6.2 + resolution: "tslib@npm:2.6.2" + checksum: 329ea56123005922f39642318e3d1f0f8265d1e7fcb92c633e0809521da75eeaca28d2cf96d7248229deb40e5c19adf408259f4b9640afd20d13aecc1430f3ad + languageName: node + linkType: hard + "tunnel-agent@npm:^0.6.0": version: 0.6.0 resolution: "tunnel-agent@npm:0.6.0" @@ -12271,6 +12795,21 @@ __metadata: languageName: node linkType: hard +"ws@npm:^8.14.1": + version: 8.14.2 + resolution: "ws@npm:8.14.2" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ">=5.0.2" + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: 3ca0dad26e8cc6515ff392b622a1467430814c463b3368b0258e33696b1d4bed7510bc7030f7b72838b9fdeb8dbd8839cbf808367d6aae2e1d668ce741d4308b + languageName: node + linkType: hard + "ws@npm:^8.8.1": version: 8.12.1 resolution: "ws@npm:8.12.1" From 6bc723916925e1d8af6adf7497c967cfa5000122 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rn=20Andre=20Tangen=20=40gorillatron?= Date: Mon, 9 Oct 2023 16:14:35 +0200 Subject: [PATCH 3/4] upgrade sdk to latest bsr release --- package.json | 2 +- yarn.lock | 107 ++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 103 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 5a1517df8..1fdb3b1bd 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "@zeitgeistpm/avatara-nft-sdk": "^1.3.1", "@zeitgeistpm/avatara-react": "^1.3.2", "@zeitgeistpm/avatara-util": "^1.2.0", - "@zeitgeistpm/sdk": "^2.36.1", + "@zeitgeistpm/sdk": "2.38.1", "@zeitgeistpm/utility": "^2.20.0", "axios": "^0.21.4", "boring-avatars": "^1.6.1", diff --git a/yarn.lock b/yarn.lock index 358911c57..13c38ad24 100644 --- a/yarn.lock +++ b/yarn.lock @@ -431,6 +431,15 @@ __metadata: languageName: node linkType: hard +"@babel/runtime@npm:^7.21.0": + version: 7.23.1 + resolution: "@babel/runtime@npm:7.23.1" + dependencies: + regenerator-runtime: ^0.14.0 + checksum: 0cd0d43e6e7dc7f9152fda8c8312b08321cda2f56ef53d6c22ebdd773abdc6f5d0a69008de90aa41908d00e2c1facb24715ff121274e689305c858355ff02c70 + languageName: node + linkType: hard + "@babel/runtime@npm:^7.3.1": version: 7.22.3 resolution: "@babel/runtime@npm:7.22.3" @@ -3438,9 +3447,9 @@ __metadata: languageName: node linkType: hard -"@zeitgeistpm/sdk@npm:^2.36.1": - version: 2.38.0 - resolution: "@zeitgeistpm/sdk@npm:2.38.0" +"@zeitgeistpm/sdk@npm:2.38.1": + version: 2.38.1 + resolution: "@zeitgeistpm/sdk@npm:2.38.1" dependencies: "@zeitgeistpm/augment-api": ^2.16.0 "@zeitgeistpm/indexer": ^3.9.0 @@ -3449,6 +3458,7 @@ __metadata: "@zeitgeistpm/web3.storage": ^2.12.0 cids: ^1.1.9 decimal.js: ^10.4.3 + human-object-diff: ^3.0.0 lodash-es: ^4.17.21 lodash.memoize: ^4.1.2 ms: ^2.1.3 @@ -3459,7 +3469,7 @@ __metadata: "@polkadot/api": "*" "@polkadot/types": "*" "@polkadot/util": "*" - checksum: c15395afb1aeb482f66dc5fe3cb824ee529348fe8204de68137f8d7c37b20f7b42d8a58ce14c07381d77fec044031dbebed9e2bd939a68f32fa466639e36ec72 + checksum: 17ad6daf7f423520a8096025817d21e336bae8737e05cd8171e9dcf4c8e64868d74cc61d607894160fe6bde024fe66ab6f119ba56925c0e2859b20b3baf1cf27 languageName: node linkType: hard @@ -3519,7 +3529,7 @@ __metadata: "@zeitgeistpm/avatara-nft-sdk": ^1.3.1 "@zeitgeistpm/avatara-react": ^1.3.2 "@zeitgeistpm/avatara-util": ^1.2.0 - "@zeitgeistpm/sdk": ^2.36.1 + "@zeitgeistpm/sdk": 2.38.1 "@zeitgeistpm/utility": ^2.20.0 autoprefixer: 10.2.5 axios: ^0.21.4 @@ -5113,6 +5123,15 @@ __metadata: languageName: node linkType: hard +"date-fns@npm:^2.29.3": + version: 2.30.0 + resolution: "date-fns@npm:2.30.0" + dependencies: + "@babel/runtime": ^7.21.0 + checksum: f7be01523282e9bb06c0cd2693d34f245247a29098527d4420628966a2d9aad154bd0e90a6b1cf66d37adcb769cd108cf8a7bd49d76db0fb119af5cdd13644f4 + languageName: node + linkType: hard + "debug@npm:4, debug@npm:4.3.4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.3": version: 4.3.4 resolution: "debug@npm:4.3.4" @@ -5151,6 +5170,15 @@ __metadata: languageName: node linkType: hard +"decamelize@npm:^2.0.0": + version: 2.0.0 + resolution: "decamelize@npm:2.0.0" + dependencies: + xregexp: 4.0.0 + checksum: e1d8274e6e6f80654fd5b96a6a3bef50f8979df10f1ab35fe2406f567df9588640a6f29e1414bec30983275e2041fb87e858df7cfd5661ea578196989d73de31 + languageName: node + linkType: hard + "decimal.js-light@npm:^2.4.1": version: 2.5.1 resolution: "decimal.js-light@npm:2.5.1" @@ -5188,6 +5216,13 @@ __metadata: languageName: node linkType: hard +"deep-diff@npm:^1.0.2": + version: 1.0.2 + resolution: "deep-diff@npm:1.0.2" + checksum: 9de8b5eedc1957116e1b47e4c3c4e3dbe23cb741abefc5ec8829a12e77958c689ac46888a3c35320f976cf42fb6de2b016e158facdb24d894ab5b5fdabad9b34 + languageName: node + linkType: hard + "deep-equal@npm:^1.0.1": version: 1.1.1 resolution: "deep-equal@npm:1.1.1" @@ -5693,6 +5728,17 @@ __metadata: languageName: node linkType: hard +"eslint-config-prettier@npm:^8.8.0": + version: 8.10.0 + resolution: "eslint-config-prettier@npm:8.10.0" + peerDependencies: + eslint: ">=7.0.0" + bin: + eslint-config-prettier: bin/cli.js + checksum: 153266badd477e49b0759816246b2132f1dbdb6c7f313ca60a9af5822fd1071c2bc5684a3720d78b725452bbac04bb130878b2513aea5e72b1b792de5a69fec8 + languageName: node + linkType: hard + "esprima@npm:^4.0.0, esprima@npm:^4.0.1": version: 4.0.1 resolution: "esprima@npm:4.0.1" @@ -5854,6 +5900,13 @@ __metadata: languageName: node linkType: hard +"fast-deep-equal@npm:^3.1.3": + version: 3.1.3 + resolution: "fast-deep-equal@npm:3.1.3" + checksum: e21a9d8d84f53493b6aa15efc9cfd53dd5b714a1f23f67fb5dc8f574af80df889b3bce25dc081887c6d25457cce704e636395333abad896ccdec03abaf1f3f9d + languageName: node + linkType: hard + "fast-diff@npm:1.1.2": version: 1.1.2 resolution: "fast-diff@npm:1.1.2" @@ -6584,6 +6637,20 @@ __metadata: languageName: node linkType: hard +"human-object-diff@npm:^3.0.0": + version: 3.0.0 + resolution: "human-object-diff@npm:3.0.0" + dependencies: + date-fns: ^2.29.3 + deep-diff: ^1.0.2 + eslint-config-prettier: ^8.8.0 + fast-deep-equal: ^3.1.3 + humanize-string: ^2.1.0 + titleize: ^2.1.0 + checksum: e92231974c6f5cc960a5717a8266419e42d62bb55498e1a82bb1edb6312037441fc2fbc73ac759c2eb70ff3809e84ac06a16c68f255fa0700e3ee5a3cd6f489b + languageName: node + linkType: hard + "human-signals@npm:^2.1.0": version: 2.1.0 resolution: "human-signals@npm:2.1.0" @@ -6600,6 +6667,15 @@ __metadata: languageName: node linkType: hard +"humanize-string@npm:^2.1.0": + version: 2.1.0 + resolution: "humanize-string@npm:2.1.0" + dependencies: + decamelize: ^2.0.0 + checksum: 75d6b6a12b1284e41b736eef0f99ca77609895ca6074eb314a08f2d6aefc68858003f1c5ead2027a16cab650ecbe9b92bece80f5ca99af700962647ee5f6ab56 + languageName: node + linkType: hard + "iconv-lite@npm:0.6.3, iconv-lite@npm:^0.6.2": version: 0.6.3 resolution: "iconv-lite@npm:0.6.3" @@ -10894,6 +10970,13 @@ __metadata: languageName: node linkType: hard +"regenerator-runtime@npm:^0.14.0": + version: 0.14.0 + resolution: "regenerator-runtime@npm:0.14.0" + checksum: 1c977ad82a82a4412e4f639d65d22be376d3ebdd30da2c003eeafdaaacd03fc00c2320f18120007ee700900979284fc78a9f00da7fb593f6e6eeebc673fba9a3 + languageName: node + linkType: hard + "regexp.prototype.flags@npm:^1.2.0, regexp.prototype.flags@npm:^1.4.3": version: 1.4.3 resolution: "regexp.prototype.flags@npm:1.4.3" @@ -11902,6 +11985,13 @@ __metadata: languageName: node linkType: hard +"titleize@npm:^2.1.0": + version: 2.1.0 + resolution: "titleize@npm:2.1.0" + checksum: f4e6a479cba7d45fd3a0da1ced7f0c7701ce4f0b9a1751f0d561e69657a4bbd84699825c2f4184ec8b6b28570cfdc42ee4bf6fd9a4565816d6a85c87b2926940 + languageName: node + linkType: hard + "tmpl@npm:1.0.5": version: 1.0.5 resolution: "tmpl@npm:1.0.5" @@ -12839,6 +12929,13 @@ __metadata: languageName: node linkType: hard +"xregexp@npm:4.0.0": + version: 4.0.0 + resolution: "xregexp@npm:4.0.0" + checksum: ce644eb022fa3370dbf53e1b6f28d7a25dd6cca711ba463c129141429d11776a1239c604370bdcaf93c5028ff8d75cac2a10644377cb649b985c0094da5ef693 + languageName: node + linkType: hard + "xtend@npm:^4.0.0, xtend@npm:^4.0.2": version: 4.0.2 resolution: "xtend@npm:4.0.2" From ae8d3ff310df18cd2b11386f1264b52fe3922c05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rn=20Andre=20Tangen=20=40gorillatron?= Date: Tue, 10 Oct 2023 10:49:27 +0200 Subject: [PATCH 4/4] use MarketReport from Indexer --- lib/gql/markets.ts | 5 +++-- lib/types/markets.ts | 6 ------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/lib/gql/markets.ts b/lib/gql/markets.ts index e634d437f..18b9687ce 100644 --- a/lib/gql/markets.ts +++ b/lib/gql/markets.ts @@ -1,8 +1,9 @@ import { MarketStatus, ScalarRangeType } from "@zeitgeistpm/sdk"; +import { MarketReport } from "@zeitgeistpm/indexer"; import { gql, GraphQLClient } from "graphql-request"; import { DAY_SECONDS } from "lib/constants"; import { marketMetaFilter } from "./constants"; -import { MarketDispute, Report } from "lib/types/markets"; +import { MarketDispute } from "lib/types/markets"; const marketIdsQuery = gql` query MarketIds($end: BigInt) { @@ -108,7 +109,7 @@ export interface MarketPageIndexedData { categorical: string; }; disputes: MarketDispute[]; - report: Report; + report: MarketReport; creator: string; oracle: string; tags: []; diff --git a/lib/types/markets.ts b/lib/types/markets.ts index fab48d4b0..2e9309080 100644 --- a/lib/types/markets.ts +++ b/lib/types/markets.ts @@ -20,12 +20,6 @@ export enum EMarketStatus { export type MarketStatus = keyof typeof EMarketStatus; -export type Report = { - at: number; - by: string; - outcome: OutcomeReport; -}; - export type MarketDispute = { at: number; by: string;