Update CosmosKit tutorial
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user