1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-01 13:47:06 +01:00
metamask-extension/app/scripts/controllers/network
Mark Stacey 9847179f54
Set network status to "unknown" when ID is invalid (#19068)
We now set the network status to "unknown" rather than "unavailable"
when the network ID is invalid. This better reflects what we know when
this happens, and it makes the network controller better aligned with
the core network controller.

This was accomplished by using a regular error for the network ID
assertion rather than using `assert` directly. `assert` would throw an
error with a `code` property, which resutled in us treating it like an
RPC error.

This isn't tested, but it was found in the course of porting unit tests
from core to extension. It will be covered by these tests, which will
be added in the next PR.

This change should have no functional impact because we treat these two
network statuses as equivalent. The distinction between unknown and
unavailable is useful only for debugging.
2023-05-09 15:44:14 -02:30
..
provider-api-tests Convert NetworkController net client tests to TS (#18490) 2023-04-14 10:21:29 -06:00
test Use fake provider for NetworkController unit tests (#18628) 2023-04-20 15:21:41 -02:30
create-network-client.test.ts Convert NetworkController net client tests to TS (#18490) 2023-04-14 10:21:29 -06:00
create-network-client.ts Refactor network client constructor (#17652) 2023-03-22 17:20:59 -05:00
index.ts Convert NetworkController to TS (#18358) 2023-04-11 10:07:24 -06:00
network-controller.test.ts Rename provider to providerConfig (#18907) 2023-05-02 13:23:20 -02:30
network-controller.ts Set network status to "unknown" when ID is invalid (#19068) 2023-05-09 15:44:14 -02:30