-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
Replace network
state with networkId
and networkStatus
#1196
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
Gudahtt
force-pushed
the
replace-network-with-network-status
branch
5 times, most recently
from
April 17, 2023 22:27
087e0f5
to
03739b1
Compare
The network controller `network` state used to be set to `loading` if the network was loading or uninitialized, or to the network ID if the network had finished loading. Effectively it was tracking both the network ID for the current selected network, and the network status. This state property has been split in two; now we track the network ID of the current selected network separately from the network status. The network status has been expanded to include more states as well. Closes #1020
Gudahtt
force-pushed
the
replace-network-with-network-status
branch
from
April 17, 2023 22:28
03739b1
to
fb98499
Compare
legobeat
reviewed
Apr 18, 2023
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
mcmire
reviewed
Apr 18, 2023
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.
Makes sense! Just had a single suggestion.
packages/transaction-controller/src/TransactionController.test.ts
Outdated
Show resolved
Hide resolved
mcmire
approved these changes
Apr 18, 2023
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.
Great!
Merged
Gudahtt
added a commit
that referenced
this pull request
May 10, 2023
The network change handler for the ENS controller has been broken since the PR #1170 due to a conflict with #1196, which was merged around the same time. It referenced the `network` property of the network state that we have removed. The change handler has been updated to use `networkId` instead. Additionally, the `NetworkState` type has been imported so that we're less likely to make this mistake again.
Gudahtt
added a commit
that referenced
this pull request
May 10, 2023
The network change handler for the ENS controller has been broken since the PR #1170 due to a conflict with #1196, which was merged around the same time. It referenced the `network` property of the network state that we have removed. The change handler has been updated to use `networkId` instead. Additionally, the `NetworkState` type has been imported so that we're less likely to make this mistake again.
3 tasks
Gudahtt
added a commit
that referenced
this pull request
May 10, 2023
The network change handler for the ENS controller has been broken since the PR #1170 due to a conflict with #1196, which was merged around the same time. It referenced the `network` property of the network state that we have removed. The change handler has been updated to use `networkId` instead. Additionally, the `NetworkState` type has been imported so that we're less likely to make this mistake again.
Gudahtt
added a commit
that referenced
this pull request
May 10, 2023
The network change handler for the ENS controller has been broken since the PR #1170 due to a conflict with #1196, which was merged around the same time. It referenced the `network` property of the network state that we have removed. The change handler has been updated to use `networkId` instead. Additionally, the `NetworkState` type has been imported so that we're less likely to make this mistake again.
MajorLift
pushed a commit
that referenced
this pull request
Oct 11, 2023
* Replace `network` state with `networkId` and `networkStatus` The network controller `network` state used to be set to `loading` if the network was loading or uninitialized, or to the network ID if the network had finished loading. Effectively it was tracking both the network ID for the current selected network, and the network status. This state property has been split in two; now we track the network ID of the current selected network separately from the network status. The network status has been expanded to include more states as well. Closes #1020 * Clarify description Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com> * Adjust types used in tests --------- Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
MajorLift
pushed a commit
that referenced
this pull request
Oct 11, 2023
The network change handler for the ENS controller has been broken since the PR #1170 due to a conflict with #1196, which was merged around the same time. It referenced the `network` property of the network state that we have removed. The change handler has been updated to use `networkId` instead. Additionally, the `NetworkState` type has been imported so that we're less likely to make this mistake again.
MajorLift
pushed a commit
that referenced
this pull request
Oct 11, 2023
* Replace `network` state with `networkId` and `networkStatus` The network controller `network` state used to be set to `loading` if the network was loading or uninitialized, or to the network ID if the network had finished loading. Effectively it was tracking both the network ID for the current selected network, and the network status. This state property has been split in two; now we track the network ID of the current selected network separately from the network status. The network status has been expanded to include more states as well. Closes #1020 * Clarify description Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com> * Adjust types used in tests --------- Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
MajorLift
pushed a commit
that referenced
this pull request
Oct 11, 2023
The network change handler for the ENS controller has been broken since the PR #1170 due to a conflict with #1196, which was merged around the same time. It referenced the `network` property of the network state that we have removed. The change handler has been updated to use `networkId` instead. Additionally, the `NetworkState` type has been imported so that we're less likely to make this mistake again.
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.
Description
The network controller
network
state used to be set toloading
if the network was loading or uninitialized, or to the network ID if the network had finished loading. Effectively it was tracking both the network ID for the current selected network, and the network status.This state property has been split in two; now we track the network ID of the current selected network separately from the network status. The network status has been expanded to include more states as well.
Changes
network
state has been replaced bynetworkId
andnetworkStatus
network
to access the network ID, usenetworkId
now instead. It will be set tonull
rather thanloading
if the network is not currently available.network
to see if the network was currently available, usenetworkStatus
instead. It will be set toNetworkStatus.Available
if the network is available.References
Relates to #1020
Checklist