- 
                Notifications
    
You must be signed in to change notification settings  - Fork 163
 
ICNS integration #124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ICNS integration #124
Conversation
        
          
                packages/react/package.json
              
                Outdated
          
        
      | "@babel/runtime": "7.11.2", | ||
| "@chakra-ui/react": "2.4.3", | ||
| "@cosmos-kit/core": "^0.27.13", | ||
| "@cosmos-kit/icns": "^0.0.1", | 
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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!
| 
           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'; | |||
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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(); | 
There was a problem hiding this comment.
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 ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wen merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very soon!
Add ICNS integration for cosmos-kit. This PR contains
@cosmos-kit/icnsas a separated packagereactpackage, 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/icnsThe goal is to make it modular and not imposed itself as a default name service so developer can choose what they want.