From 07b0fab54abcb9053fee83f38952c5d59970f39a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ti=E1=BA=BFn=20Nguy=E1=BB=85n=20Kh=E1=BA=AFc?= Date: Tue, 8 Oct 2024 11:27:10 +1300 Subject: [PATCH] fix(docs): outdated info (#229) --- apps/docs/docs/getting-started/setup.mdx | 4 ++-- apps/docs/docs/guides/multichain.md | 9 +++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/apps/docs/docs/getting-started/setup.mdx b/apps/docs/docs/getting-started/setup.mdx index 9ed74d21..9a55475c 100644 --- a/apps/docs/docs/getting-started/setup.mdx +++ b/apps/docs/docs/getting-started/setup.mdx @@ -104,7 +104,7 @@ export const config = { ```ts title="config.ts" import { dot } from "@polkadot-api/descriptors"; -import { WebSocketProvider } from "@polkadot-api/ws-provider/web"; +import { getWsProvider } from "@polkadot-api/ws-provider/web"; import type { Config } from "@reactive-dot/core"; import { InjectedWalletAggregator } from "@reactive-dot/core/wallets.js"; @@ -112,7 +112,7 @@ export const config = { chains: { polkadot: { descriptor: dot, - provider: WebSocketProvider("wss://polkadot-rpc.publicnode.com"), + provider: getWsProvider("wss://polkadot-rpc.publicnode.com"), }, }, wallets: [new InjectedWalletAggregator()], diff --git a/apps/docs/docs/guides/multichain.md b/apps/docs/docs/guides/multichain.md index 5b5f52a4..80cd1e2a 100644 --- a/apps/docs/docs/guides/multichain.md +++ b/apps/docs/docs/guides/multichain.md @@ -22,14 +22,11 @@ npx papi ### Add type information ```ts title="reactive-dot.d.ts" -import type { dot, ksm, wnd } from "@polkadot-api/descriptors"; +import type { config } from "./config"; +import type { InferChains } from "@reactive-dot/core"; declare module "@reactive-dot/core" { - export interface Chains { - polkadot: typeof dot; - kusama: typeof ksm; - westend: typeof wnd; - } + export interface Chains extends InferChains {} } ```