Skip to content

Conversation

@iboss-ptk
Copy link
Contributor

Add ICNS integration for cosmos-kit. This PR contains

  • @cosmos-kit/icns as a separated package
  • icns hooks in react package, let me know if it makes more sense to separate the hook logic out as it's own package (eg. @cosmos-kit/icns-react) or moved to @cosmos-kit/icns

The goal is to make it modular and not imposed itself as a default name service so developer can choose what they want.

"@babel/runtime": "7.11.2",
"@chakra-ui/react": "2.4.3",
"@cosmos-kit/core": "^0.27.13",
"@cosmos-kit/icns": "^0.0.1",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think adding @cosmos-kit/icns inside of @cosmos-kit/react is sort of like adding it to the core... is there a way to move this logic in the @cosmos-kit/icns package?

Ideally we can load everything as a plugin w/o modifying @cosmos-kit/core or @cosmos-kit/react

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense, I will move the logic!

@iboss-ptk
Copy link
Contributor Author

Fixed according to the feedback, lmk if there is anything else to update @pyramation

@@ -0,0 +1,75 @@
import { CosmWasmClient } from '@cosmjs/cosmwasm-stargate';
import { useChain, useWallet } from '@cosmos-kit/react';
import useSWR from 'swr';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey, what is swr needed for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like you have already figured out :)

const { data, error, isLoading } = useSWR(
`${swrNamespace}/${address}`,
async () => {
const client = await osmosis.getCosmWasmClient();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the way! thanks for using the right tools for the job ;)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wen merge

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very soon!

@pyramation pyramation changed the base branch from main to feat/name-resolvers January 3, 2023 04:25
@pyramation pyramation merged commit 9c33f13 into hyperweb-io:feat/name-resolvers Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants