-
-
Notifications
You must be signed in to change notification settings - Fork 261
add rollbackToPreviousProvider method #1132
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
Conversation
3492ae6 to
ae2603d
Compare
f659097 to
479e349
Compare
cc23734 to
b0f9743
Compare
mcmire
left a comment
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.
This is looking good! Just a few comments
| ) { | ||
| super(config, state); | ||
| this.defaultConfig = { | ||
| networkType: MAINNET, |
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.
Nice! Yeah this is much better.
| rpc = 'rpc', | ||
| } | ||
|
|
||
| export const isNetworkType = (val: any): val is NetworkType => { |
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.
Thoughts on making this a function instead of a const? I believe this will enforce that this is JSDoc'd as well.
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.
done here: 19c536a
ceb710d to
49b5222
Compare
mcmire
left a comment
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.
This looks great!
1500a6e to
8061393
Compare
mcmire
left a comment
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.
One small thing, but other than that, good to go.
| @@ -1,5 +1,6 @@ | |||
| /* eslint-disable jest/require-top-level-describe, jest/no-export, jest/no-identical-title, jest/no-if */ | |||
|
|
|||
| import { NetworkType } from '@metamask/controller-utils/src'; | |||
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.
Are we exporting this type from controller-utils? If so, I think we can drop the /src.
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.
oh... weird not sure how that happened!
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.
fixed here: da27c40
mcmire
left a comment
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.
Looks good!
* add rollbackToPreviousProvider method
* add rollbackToPreviousProvider method
ADDED:
rollbackToPreviousProvidermethod like the one that exists on the extension sideNetworkControllerResolves #1024