-
-
Notifications
You must be signed in to change notification settings - Fork 201
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
Rename executePoll
-> _executePoll
+ stopPollingByNetworkClientId
-> stopPollingByPollingToken
#1810
Conversation
9a4214b
to
41c4258
Compare
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.
The new names make sense! I just had some suggestions on further communicating that _executePoll
is private, and for being consistent internally in treating this method as though it were truly private.
@@ -1294,7 +1294,7 @@ describe('TokenListController', () => { | |||
}); | |||
}); | |||
|
|||
describe('executePoll', () => { | |||
describe('_executePoll', () => { |
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.
Do we want to keep these tests if we are essentially making this method private? We don't conventionally test private code; we should be able to rename this method now without the tests breaking. Is there some other place we could move these tests to?
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.
removed this block and moved the test into the startPollingByNetworkClientId
test block: 7a40412
@@ -868,7 +868,7 @@ describe('GasFeeController', () => { | |||
}); | |||
}); | |||
}); | |||
describe('executePoll', () => { | |||
describe('_executePoll', () => { |
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.
Similar for these tests.
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.
removed this block and moved the test into the startPollingByNetworkClientId
test block: 7a40412
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.
Hmm, I see the changes for TokenListController, those look great — do we want to do the same for this controller?
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.
sorry whoops so in that commit I linked I moved some of the logic into the existing startPollingByNetworkClientId
test but forgot to remove this block. That removal is done here: b9502fc
…stopPollingByPollingToken
9f870a6
to
7a40412
Compare
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.
LGTM!
Fast-follow to #1776, just a few (breaking) naming cleanups
CHANGED
executePoll
renamed to_executePoll
stopPollingByNetworkClientId
renamed tostopPollingByPollingToken