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

ADD: Refactor KeygenViewModel #1021

Open
johnnyluo opened this issue Sep 23, 2024 · 0 comments
Open

ADD: Refactor KeygenViewModel #1021

johnnyluo opened this issue Sep 23, 2024 · 0 comments
Assignees
Labels
refactoring 🧹 Improve code

Comments

@johnnyluo
Copy link
Contributor

johnnyluo commented Sep 23, 2024

KeygenFlowViewModel:

  1. Create a UseCase for ParticipantDiscovery, remove GlobalScope, remove LiveData, ensure it shuts down when exiting the ViewModel and in other necessary cases
  2. Move the generation of serviceName into the UseCase
  3. Deal with action field, make it reactive
  4. Make isRelayEnabled reactive, along with network switching
  5. Add a static MediatorService::start with arguments so that the Intent is formed there
  6. Move generateServerPartyId into the UseCase
  7. Make state reactive
  8. In several places inside state.update, the value for the state is obtained from a variable, although it is available
  9. Move the local serverAddress to constants

GeneratingKeyViewModel:

  1. Remove suppression.
  2. Add @ApplicationContext for the context.
  3. Remove the call to .applicationContext.
  4. Make TssMessagePuller a UseCase, just like with ParticipantDiscovery; remove the Cache, either entirely or replace it with a Map.
@yevhen1sec yevhen1sec self-assigned this Sep 23, 2024
@yvebe yvebe added the refactoring 🧹 Improve code label Sep 27, 2024
@yvebe yvebe assigned yvebe and unassigned yevhen1sec Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring 🧹 Improve code
Projects
None yet
Development

No branches or pull requests

3 participants