mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 01:47:00 +01:00
Sync default value of networkDetails w/ core (#19407)
In the core version of NetworkController, the `networkDetails` property is initialized to `{ EIPS: {} }`. It is also reset to this representation when `refreshNetwork` is called. In this version of NetworkController, however, the default representation of `networkDetails` is `{ EIPS: { 1559: undefined } }`. From a consumer's perspective this doesn't make a difference — it's practically the same. It does make a slight difference in tests, however. With that in mind, this commit changes the default representation to `{ EIPS: {} }`. This makes it easier to visually compare differences in the NetworkController unit tests between core and this repo.
This commit is contained in:
parent
931b126831
commit
63c402155d
@ -173,9 +173,7 @@ describe('NetworkController', () => {
|
||||
{
|
||||
"networkConfigurations": {},
|
||||
"networkDetails": {
|
||||
"EIPS": {
|
||||
"1559": undefined,
|
||||
},
|
||||
"EIPS": {},
|
||||
},
|
||||
"networkId": null,
|
||||
"networkStatus": "unknown",
|
||||
@ -2804,9 +2802,7 @@ describe('NetworkController', () => {
|
||||
expect(
|
||||
controller.store.getState().networkDetails,
|
||||
).toStrictEqual({
|
||||
EIPS: {
|
||||
1559: undefined,
|
||||
},
|
||||
EIPS: {},
|
||||
});
|
||||
},
|
||||
});
|
||||
@ -3519,9 +3515,7 @@ describe('NetworkController', () => {
|
||||
expect(
|
||||
controller.store.getState().networkDetails,
|
||||
).toStrictEqual({
|
||||
EIPS: {
|
||||
1559: undefined,
|
||||
},
|
||||
EIPS: {},
|
||||
});
|
||||
},
|
||||
});
|
||||
@ -4788,9 +4782,7 @@ function refreshNetworkTests({
|
||||
});
|
||||
|
||||
expect(controller.store.getState().networkDetails).toStrictEqual({
|
||||
EIPS: {
|
||||
1559: undefined,
|
||||
},
|
||||
EIPS: {},
|
||||
});
|
||||
},
|
||||
);
|
||||
|
@ -357,9 +357,7 @@ function buildDefaultNetworkStatusState(): NetworkStatus {
|
||||
*/
|
||||
function buildDefaultNetworkDetailsState(): NetworkDetails {
|
||||
return {
|
||||
EIPS: {
|
||||
1559: undefined,
|
||||
},
|
||||
EIPS: {},
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user