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
Brand-new network selection screen and a lot of refactoring #851
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment has been minimized.
This comment has been minimized.
brusherru
force-pushed
the
refactoring-main-process
branch
from
January 11, 2022 08:42
1a68c22
to
74ea25e
Compare
brusherru
changed the title
Brand-new network selection screen and a lot of refactoring (WIP)
Brand-new network selection screen and a lot of refactoring
Jan 11, 2022
This comment has been minimized.
This comment has been minimized.
brusherru
force-pushed
the
refactoring-main-process
branch
from
January 11, 2022 21:11
74ea25e
to
e30930e
Compare
This comment has been minimized.
This comment has been minimized.
brusherru
force-pushed
the
refactoring-main-process
branch
from
January 12, 2022 10:24
e30930e
to
5f785c1
Compare
This comment has been minimized.
This comment has been minimized.
brusherru
force-pushed
the
refactoring-main-process
branch
2 times, most recently
from
January 13, 2022 12:37
52275c3
to
af48d4c
Compare
brusherru
force-pushed
the
refactoring-main-process
branch
from
January 26, 2022 13:28
af48d4c
to
8c9e0c7
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It closes #837 and fixes #822
Also, in case if User opens a wallet and the network does not exist on the discovery service — the app will ask the User to switch the network.
The same behavior will be triggered in case if network disappeared from the discovery service (not sure do we need to do that or not), this check happens every 5 minutes.
About refactoring.
In common, it decouples initialization of Managers (Node, Smesher, Wallet) and some event handlers from the requirement of prefetch data, that can't be prefetched since the user didn't select a network yet. In other words, now Smapp may start without knowledge about any available network, and therefore may start Node and GRPC clients much later.
To reach this goal I had to:
context
in the main process. So now different parts of the system may be less coupled with others but have a shared "state" (in the simplest version which mutates an object by reference).WalletManager
, so WalletManager becomes in common the same mediator between client and GRPC Services, as others.I believe that these changes will make the app more stable (unknown network / disconnected now is an expected state of the App), and more maintainable since we decoupled a lot of parts of the whole system.
IPC subscriptions, invokers, and types should be refactored further. But probably within another PR.