From c935fbf72d81cd058b6785757ef21dccb80fb359 Mon Sep 17 00:00:00 2001 From: kien-ngo Date: Fri, 4 Oct 2024 12:57:18 +0000 Subject: [PATCH] [Portal] Fix useChain in migrate docs (#4921) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Problem solved Short description of the bug fixed or feature added --- ## PR-Codex overview This PR updates the TypeScript SDK v5 cheatsheet to reflect changes in the wallet connection methods, specifically updating the references for the `Get Connected Chain` functionality. ### Detailed summary - Updated the reference for `Get Connected Chain` from [`useSwitchActiveWalletChain()`] to [`useActiveWalletChain()`] in both `page.mdx` files. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- apps/portal/src/app/react/v5/migrate/cheatsheet/page.mdx | 2 +- apps/portal/src/app/typescript/v5/migrate/page.mdx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/portal/src/app/react/v5/migrate/cheatsheet/page.mdx b/apps/portal/src/app/react/v5/migrate/cheatsheet/page.mdx index c2fa8b3ea92..712547fb6c0 100644 --- a/apps/portal/src/app/react/v5/migrate/cheatsheet/page.mdx +++ b/apps/portal/src/app/react/v5/migrate/cheatsheet/page.mdx @@ -14,7 +14,7 @@ | Connect | `ConnectWallet` | [`ConnectButton`](/react/v5/ConnectButton) | | Connection Status | `useConnectionStatus()` | [`useActiveWalletConnectionStatus()`](/references/typescript/v5/useActiveWalletConnectionStatus) | | Switch Chain | `useSwitchChain()` | [`useSwitchActiveWalletChain()`](/references/typescript/v5/useSwitchActiveWalletChain) | -| Get Connected Chain | `useChain()` | [`useSwitchActiveWalletChain()`](/references/typescript/v5/useSwitchActiveWalletChain) | +| Get Connected Chain | `useChain()` | [`useActiveWalletChain()`](/references/typescript/v5/useActiveWalletChain) | ### TypeScript Cheatsheet diff --git a/apps/portal/src/app/typescript/v5/migrate/page.mdx b/apps/portal/src/app/typescript/v5/migrate/page.mdx index 24ff67d18b6..2881b36ade7 100644 --- a/apps/portal/src/app/typescript/v5/migrate/page.mdx +++ b/apps/portal/src/app/typescript/v5/migrate/page.mdx @@ -2,7 +2,7 @@ import { ArticleIconCard, } from "@doc"; import { - ReactIcon, + ReactIcon, } from "@/icons"; # Migration from TypeScript SDK v4 @@ -178,4 +178,4 @@ const onClick = async () => { | Connect | `ConnectWallet` | [`ConnectButton`](/react/v5/ConnectButton) | | Connection Status | `useConnectionStatus()` | [`useActiveWalletConnectionStatus()`](/references/typescript/v5/useActiveWalletConnectionStatus) | | Switch Chain | `useSwitchChain()` | [`useSwitchActiveWalletChain()`](/references/typescript/v5/useSwitchActiveWalletChain) | -| Get Connected Chain | `useChain()` | [`useSwitchActiveWalletChain()`](/references/typescript/v5/useSwitchActiveWalletChain) | +| Get Connected Chain | `useChain()` | [`useActiveWalletChain()`](/references/typescript/v5/useActiveWalletChain) |