starknet-react icon indicating copy to clipboard operation
starknet-react copied to clipboard

Match `wagmi` API

Open fracek opened this issue 3 years ago • 1 comments

The new version of wagmi changed their API and now it's closer to the API in starknet-react. From a discussion with @pet3ris we started thinking about aligning our API to wagmi's since now the differences are minuscule.

The changes will be:

  • Rename hooks to follow wagmi's names
  • Rename hooks return values to match wagmi's. Most return values already match them
  • Change the hooks parameters to have positional arguments over keyword arguments like we do now
  • Add shims to map the current api with the new api so that the transition will be smooth

The semantics of the library will not change

fracek avatar May 09 '22 11:05 fracek

Very interesting. Maybe could be a good idea to split this "refactoring" into several issues, it will help :

  • to get the list of changes to do
  • for people to know exactly how to help on small features
  • to open discussion on specific features

ltoussaint avatar May 17 '22 07:05 ltoussaint