Skip to content
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

Create a custom hook for application management #4371

Closed
Tracked by #4037
soroushm opened this issue Jun 29, 2022 · 0 comments
Closed
Tracked by #4037

Create a custom hook for application management #4371

soroushm opened this issue Jun 29, 2022 · 0 comments
Assignees
Milestone

Comments

@soroushm
Copy link
Contributor

soroushm commented Jun 29, 2022

Description

A Custom hooks for the application is an interface to handle all the logic related to application management. This enables the component/hooks to use applications logic from one single place

Acceptance Criteria

  • Fetch list of applications, the list should be a mix of user applications and default application fetched from the server
  • Enable ‘isPin’ flag for default applications from useApplicationsPin hooks then sort the list by pinned priority
  • Enable memoization for applications
  • Update status by fetching status from the server
  • Allow users to add an application to the store by setApplication method
  • Allow users to fetch a specific application by chainId via getApplicationByChainId
  • Allow users to remove specific application by chainId from local storage via deleteApplicationByChainId
  • If the current application is same as the selected application for remove, we need set Lisk as current application via useCurrentApplication
  • Add required unit tests

Additional Information

  • Suggested component name useApplicationsManagement
  • Create reducer for blockchain application management and combine them as blockchainApplications
    state.blockChainApplications.management
function useApplicationManagement() {

  return {applications, setApplication, deleteApplicationByChainId, getApplicationByChainId};
}

blocked by #4373, #4357

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

3 participants