lisk-mobile icon indicating copy to clipboard operation
lisk-mobile copied to clipboard

Changes to WalletConnect package files/folders naming

Open clemente-xyz opened this issue 2 years ago • 0 comments

Description

There are some naming improvements we would like to do on the recently implemented wallet-connect package on Desktop (PR here).

Proposal

  1. Make the wallet-connect code to live in ./packages/wallet-connect/... instead of ./libs/... . This could be a React cross-client package that eventually in a future will be a Lisk could be published on npm.
  2. Change to PascalCase the libs/wcm/context/..., since they are React components.
  3. Make ConnectionSummary a react hook (useConnectionSummary), since no UI is rendered, only hooks.
  4. Provide a clear error, isLoading and isSuccess API on hooks for all external connection actions, including set a connection, disconnect application, loading connection, etc. We are having to make this state transition states on each component, and would be nice to have it centralised in one place.
  5. Make separate hooks for approving, rejecting and responding to session requests (split in multiple hooks the useSession actual hook). Add error, isLoading and isSuccess for each one.

clemente-xyz avatar Sep 14 '22 10:09 clemente-xyz