Skip to content

Commit

Permalink
Remove unused networkType configuration
Browse files Browse the repository at this point in the history
The `networkType` configuration option has been removed from the NFT
controller and the tokens controller. In both cases it was unused.

This relates to #1209
  • Loading branch information
Gudahtt committed May 10, 2023
1 parent 8ca068f commit 08ad0b8
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
4 changes: 0 additions & 4 deletions packages/assets-controllers/src/NftController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import {
ERC1155,
OPENSEA_API_URL,
OPENSEA_PROXY_URL,
NetworkType,
} from '@metamask/controller-utils';
import type {
ApiNft,
Expand Down Expand Up @@ -131,11 +130,9 @@ interface AccountParams {
* @type NftConfig
*
* NFT controller configuration
* @property networkType - Network ID as per net_version
* @property selectedAddress - Vault selected address
*/
export interface NftConfig extends BaseConfig {
networkType: NetworkType;
selectedAddress: string;
chainId: string;
ipfsGateway: string;
Expand Down Expand Up @@ -910,7 +907,6 @@ export class NftController extends BaseController<NftConfig, NftState> {
) {
super(config, state);
this.defaultConfig = {
networkType: NetworkType.mainnet,
selectedAddress: '',
chainId: '',
ipfsGateway: IPFS_DEFAULT_GATEWAY_URL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ describe('NftDetectionController', () => {
});

nftController.configure({
networkType: NetworkType.mainnet,
selectedAddress,
});
const { chainId } = nftDetection.config;
Expand Down Expand Up @@ -495,7 +494,6 @@ describe('NftDetectionController', () => {

nftController.configure({
selectedAddress,
networkType: NetworkType.mainnet,
});

const { chainId } = nftDetection.config;
Expand Down Expand Up @@ -663,7 +661,6 @@ describe('NftDetectionController', () => {
});

nftController.configure({
networkType: NetworkType.mainnet,
selectedAddress,
});

Expand Down Expand Up @@ -701,7 +698,6 @@ describe('NftDetectionController', () => {
});

nftController.configure({
networkType: NetworkType.mainnet,
selectedAddress,
});

Expand Down
4 changes: 0 additions & 4 deletions packages/assets-controllers/src/TokensController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import {
import type { PreferencesState } from '@metamask/preferences-controller';
import type { NetworkState } from '@metamask/network-controller';
import {
NetworkType,
toChecksumHexAddress,
ERC721_INTERFACE_ID,
ORIGIN_METAMASK,
Expand All @@ -42,11 +41,9 @@ import {
* @type TokensConfig
*
* Tokens controller configuration
* @property networkType - Network ID as per net_version
* @property selectedAddress - Vault selected address
*/
export interface TokensConfig extends BaseConfig {
networkType: NetworkType;
selectedAddress: string;
chainId: string;
provider: any;
Expand Down Expand Up @@ -244,7 +241,6 @@ export class TokensController extends BaseController<
super(config, state);

this.defaultConfig = {
networkType: NetworkType.mainnet,
selectedAddress: '',
chainId: '',
provider: undefined,
Expand Down

0 comments on commit 08ad0b8

Please sign in to comment.