Closed j0nl1 closed 1 year ago
@j0nl1 thanks for the interest to add a new wallet to graz.
Those adapters haven't implemented. We are planning to extract wallet integration from the graz package but not sure when, thats why we have those adapters for example. Yes we have homework to create a documentation for wallet integration #99.
For now follow these steps for adding new wallet integration: Your code is already correct, since we haven't extract the wallets from the package, you need to add it in our functions
Add the wallet type name here
this already correct
Add it to actions/wallet.ts
. I've seen your code, is the wallet object following keplr object structure? window.vectis.cosmos
=== window.keplr
?
getVectis
and then add it in env.d.ts
vectis:{
cosmos: KeplrWindow["keplr"]
}
actions/wallet.ts
follow this pattern https://github.com/strangelove-ventures/graz/blob/dev/packages/graz/src/actions/wallet.ts#L554-L605 add it to useActiveWalletType
hook, this already correct
add the event listener, this already correct
And then make a PR to this repo. Let me know if you have any question or assist
@codingki thanks for the guidance and details provided.
In our case object structure is different to keplr one and for that reason my question. I wanted to make sure that adapting the object to ours is okay.
I will add changes in actions/wallet.ts
and create the pull request. I will also include the adapter in order to be supported in the future.
I will bind this issue with the pull request, again, thank you.
yeah it's ok to add to wallet type, yes include the adapter that would be great. Thank you
@j0nl1 Released in v0.0.44 https://github.com/strangelove-ventures/graz/releases/tag/v0.0.44
Is your feature request related to a problem? Please describe.
It's related with a wallet integration question.
First limitation is wallet interface only is compatible with the Keplr one. https://github.com/strangelove-ventures/graz/blob/dev/packages/graz/src/types/wallet.ts#L26
Second limitation is about adaptersI don't see any documentation or code where they are being used. I guess these adapters solve the interface issue.
Describe the solution you'd like
It would be great instead of define the wallet inside graz library, receive the wallets externally (using these adapters) and fit to the interface.
Describe alternatives you've considered
...
Additional context
Integration commit: https://github.com/nymlab/graz/commit/48d3a552d47d7b36279aeafd9a31a55ea27bb93a
Any kind of help would be really useful to complete the integration.