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

refactor: Extract fromConfig() logic from Client #2036

Merged
merged 2 commits into from
Nov 11, 2024

Conversation

steffenboe
Copy link
Contributor

Description:
The Client-Class gained some considerable size over time. I refactored the Client-Class a bit to make the Client.fromConfig()-construction logic more clear and to shrink the Client Class, by extracting the logic to the inner Config class.

Downside: Client and Config now have a bidirectional relationship, making this a little harder to understand. But the Config class is private to the Client class, so this added complexity does not leak outside.

Looking forward to your opinions regarding this refactorings.

This PR modifies ... in order to support ...

  • extract Client.fromConfig-Construction logic to Config class
  • extracted more methods to make the code more readable

Related issue(s):

Fixes #

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@steffenboe steffenboe requested a review from a team as a code owner October 13, 2024 08:58
@steffenboe steffenboe changed the title Extract fromConfig() logic from Client refactor: Extract fromConfig() logic from Client Oct 13, 2024
Copy link
Contributor

@0xivanov 0xivanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. thanks @steffenboe

@0xivanov 0xivanov merged commit a6369b9 into hashgraph:main Nov 11, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants