Skip to content

Make rollbackToPreviousProvider async - #1237

Merged
Gudahtt merged 4 commits into
mainfrom
make-rollback-to-previous-provider-async
Apr 21, 2023
Merged

Make rollbackToPreviousProvider async#1237
Gudahtt merged 4 commits into
mainfrom
make-rollback-to-previous-provider-async

Conversation

@Gudahtt

@GudahttGudahtt commented Apr 21, 2023

Copy link
Copy Markdown
Member

Description

The network controller method rollbackToPreviousProvider has been made async. This method used to switch back to the previous network without waiting for the network switch operation to complete. Now it will not resolve until the switch has completed.

Changes

  • CHANGED: rollbackToPreviousProvider is now async

References

Closes#1176

Fixes#1178

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation for new or updated code as appropriate (note: this will usually be JSDoc)
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate

@Gudahtt
Gudahttforce-pushed the update-eip-1559-compatibility-during-network-lookup branch from 7d1d9a6 to 9ad143cCompareApril 21, 2023 00:57
@Gudahtt

This comment was marked as resolved.

@Gudahtt
Gudahttforce-pushed the make-rollback-to-previous-provider-async branch from 0415411 to 948e8aeCompareApril 21, 2023 00:59
@GudahttGudahtt mentioned this pull request Apr 21, 2023
3 tasks
@Gudahtt
Gudahttforce-pushed the update-eip-1559-compatibility-during-network-lookup branch from 9ad143c to 92d373aCompareApril 21, 2023 01:38
@Gudahtt
Gudahttforce-pushed the make-rollback-to-previous-provider-async branch from 948e8ae to 7f401cdCompareApril 21, 2023 12:49
@Gudahtt
Gudahttforce-pushed the update-eip-1559-compatibility-during-network-lookup branch from eb4fae4 to 4e1f13cCompareApril 21, 2023 12:51
@Gudahtt
Gudahttforce-pushed the make-rollback-to-previous-provider-async branch from 7f401cd to 7d838f2CompareApril 21, 2023 12:51
Base automatically changed from update-eip-1559-compatibility-during-network-lookup to mainApril 21, 2023 13:27
The network controller method `rollbackToPreviousProvider` has been
made async. This method used to switch back to the previous network
without waiting for the network switch operation to complete. Now it
will not resolve until the switch has completed.
Relates to #1176
@Gudahtt
Gudahttforce-pushed the make-rollback-to-previous-provider-async branch from 7d838f2 to ed71ed8CompareApril 21, 2023 13:28
@Gudahtt
Gudahtt marked this pull request as ready for review April 21, 2023 13:28
@Gudahtt
Gudahtt requested a review from a team as a code ownerApril 21, 2023 13:28

@mcmiremcmire left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple things, but otherwise looks good.

});

await waitForStateChanges(messenger, {
propertyPath: ['networkId'],

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I must have missed this when I wrote it.

Comment threadpackages/network-controller/tests/NetworkController.test.ts Outdated

@mcmiremcmire left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@Gudahtt
Gudahtt merged commit bd29cbc into mainApr 21, 2023
@Gudahtt
Gudahtt deleted the make-rollback-to-previous-provider-async branch April 21, 2023 16:44
@legobeatlegobeat mentioned this pull request Apr 25, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Eliminate console errors/warnings when running network controller unit tests NetworkController API normalization: Eliminate out-of-band execution

2 participants

@Gudahtt@mcmire