-
Notifications
You must be signed in to change notification settings - Fork 172
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
#chat/registry #262
#chat/registry #262
Conversation
llbartekll
commented
Jun 7, 2022
- Add registry manager
- update client api with specs
- add Concurrency
import WalletConnectUtils | ||
import WalletConnectKMS | ||
|
||
actor RegistryManager { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What the difference between Manager and Engine naming?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am always scratching my head when giving them a names. in this context it just sounds better to me. Any suggestions?
} | ||
|
||
override func tearDown() { | ||
registry = nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be not necessary to set nil at tearDown
? We setting new value in setUp
} | ||
|
||
class KeyValueRegistry: Registry { | ||
actor KeyValueRegistry: Registry { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What benefits actor gives us here?
We could make it class and make registryStore private. So it couldn't be mutated from outside too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true it is better registryStore
is private
but I think making it an actor gives thread safety
So it couldn't be mutated from outside too
It could be mutated by calling register() from different threads
anyway this class is mimicking an http client right now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async usage looks nice and convenient to use
b8da96d
to
f30f1f7
Compare
This PR is pointing to |
* Add registry manager * Update api methods * update resolve * Add description to api methods * update invite method * remove teardown * make registryStore private