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

dApp: Refactor RaidenService module #2231

Open
weilbith opened this issue Oct 12, 2020 · 0 comments
Open

dApp: Refactor RaidenService module #2231

weilbith opened this issue Oct 12, 2020 · 0 comments
Labels
dApp 📱 discussion 💬 Issues that need discussion and decision taking enhancement New feature or request test Tests related issues

Comments

@weilbith
Copy link
Contributor

Description

As pointed out in the conversation of #2186 the team has agreed to refactor the RaidenService.ts module. The tests for this module have become so messy, that nobody has neither an overview, nor understand what actually happens in terms of mocking. Moreover have the recent design adjustments to the notifications shown that also extending the RaidenServices module itself has become quite cumbersome. Also does the CodeClimate tool complain that this module and especially the connect() function are too huge and complex. Everyone working on this module only tries to make it working. Therefore we need to rework it, so productive and meaningful work is possible again.

Although this issue description should not do the work to identify the details what needs to be done how, here are some items the team has already discussed:

  • split the connect function into meaningful abstracted function calls that read easy
  • split logic from data
  • export/move pure and/or independent functions
  • establish a logical function for the notifications, export all notification converter functions to another module and establish an event to notification mapping
  • get rid of endless if-else cases

Acceptance criteria

  • RaidenService module is readable, provides a good overview, has been cleaned up and is easy to extend (Open-Close-Principle, Single-Responsibility-Principle, ...)
  • The unit tests for the RaidenService have become useful, the tester understands them and it is easy to add test cases for new features

Tasks

  • [ ]
@weilbith weilbith added enhancement New feature or request dApp 📱 test Tests related issues labels Oct 12, 2020
@taleldayekh taleldayekh added this to the Product Backlog milestone Jun 25, 2021
@taleldayekh taleldayekh added the discussion 💬 Issues that need discussion and decision taking label Jul 7, 2021
@taleldayekh taleldayekh removed this from the Product Backlog milestone Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dApp 📱 discussion 💬 Issues that need discussion and decision taking enhancement New feature or request test Tests related issues
Projects
None yet
Development

No branches or pull requests

2 participants