Skip to content

Commit 48551b9

Browse files
committed
Fix typing for TokensState
1 parent 4d65ee6 commit 48551b9

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

packages/assets-controllers/src/TokensController.ts

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,15 @@ type SuggestedAssetMeta = {
9292
* @property allIgnoredTokens - Object containing hidden/ignored tokens by network and account
9393
* @property allDetectedTokens - Object containing tokens detected with non-zero balances
9494
*/
95-
// This interface was created before this ESLint rule was added.
96-
// Convert to a `type` in a future major version.
97-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
98-
export interface TokensState extends BaseState {
99-
tokens: Token[];
100-
ignoredTokens: string[];
101-
detectedTokens: Token[];
102-
allTokens: { [chainId: Hex]: { [key: string]: Token[] } };
103-
allIgnoredTokens: { [chainId: Hex]: { [key: string]: string[] } };
104-
allDetectedTokens: { [chainId: Hex]: { [key: string]: Token[] } };
105-
}
95+
export type TokensState = BaseState &
96+
Record<string, unknown> & {
97+
tokens: Token[];
98+
ignoredTokens: string[];
99+
detectedTokens: Token[];
100+
allTokens: { [chainId: Hex]: { [key: string]: Token[] } };
101+
allIgnoredTokens: { [chainId: Hex]: { [key: string]: string[] } };
102+
allDetectedTokens: { [chainId: Hex]: { [key: string]: Token[] } };
103+
};
106104

107105
/**
108106
* The name of the {@link TokensController}.

0 commit comments

Comments
 (0)