-
Notifications
You must be signed in to change notification settings - Fork 88
Feat: Use SpokePoolManager instead of SpokePoolClients #2344
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
base: master
Are you sure you want to change the base?
Conversation
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.
How does this improve current code, I'm not quite following?
@nicholaspai Idea is to change every place where we are using spokePoolClients object directly with SpokePoolManager. Because, if we access the object directly like |
|
||
constructor( | ||
protected readonly spokePoolClients: { [chainId: number]: SpokePoolClient }, | ||
spokePoolClients: { [chainId: number]: SpokePoolClient }, |
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.
OOC why are we removing the protected + readonly?
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.
spokePoolClients will not be class property anymore. It is replaced with SpokePoolManager
and we will use spokePoolClients
just as an argument for SpokePoolManager initialization.
Use SpokePoolManager instead of SpokePoolClients object to enforce devs to handle wrong/incorrect chainIds.