From 39f519b427e97ffaa7f030fcb33acc0725034a06 Mon Sep 17 00:00:00 2001 From: Lorexia Date: Fri, 6 Oct 2023 12:33:31 +0200 Subject: [PATCH] Update CosmosKit tutorial --- sdk/typescript/docs/pages/examples/cosmos-kit.mdx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sdk/typescript/docs/pages/examples/cosmos-kit.mdx b/sdk/typescript/docs/pages/examples/cosmos-kit.mdx index 9db187dd89..b3e17f0c65 100644 --- a/sdk/typescript/docs/pages/examples/cosmos-kit.mdx +++ b/sdk/typescript/docs/pages/examples/cosmos-kit.mdx @@ -27,7 +27,7 @@ Install the required package: npm install @cosmos-kit/react @cosmos-kit/keplr @cosmos-kit/ledger chain-registry ``` -You need to polyfill some nodejs modules in order to use keplr and ledger wallets by modifying your vite.config.js: +You need to polyfill some nodejs modules in order to use keplr and ledger wallets by modifying your `vite.config.js` file: ```bash npm install @esbuild-plugins/node-globals-polyfill ``` @@ -57,7 +57,10 @@ export default defineConfig({ Your components have to be wrapped into a [ChainProvider](https://docs.cosmoskit.com/chain-provider), in order to use the `useChain('nyx')` hook. The nyx chain is provided in the 'chain-registry' NPM package by default. +Now, go to the `src` folder and open your `App.tsx` file to replace all the code with the following: + ```ts +import "./App.css"; import React from 'react'; import { ChainProvider, useChain } from '@cosmos-kit/react'; import { assets, chains } from 'chain-registry';