Skip to content

Commit

Permalink
Fix typing for TokensState
Browse files Browse the repository at this point in the history
  • Loading branch information
MajorLift committed Jan 24, 2024
1 parent 4d65ee6 commit 48551b9
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions packages/assets-controllers/src/TokensController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,15 @@ type SuggestedAssetMeta = {
* @property allIgnoredTokens - Object containing hidden/ignored tokens by network and account
* @property allDetectedTokens - Object containing tokens detected with non-zero balances
*/
// This interface was created before this ESLint rule was added.
// Convert to a `type` in a future major version.
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
export interface TokensState extends BaseState {
tokens: Token[];
ignoredTokens: string[];
detectedTokens: Token[];
allTokens: { [chainId: Hex]: { [key: string]: Token[] } };
allIgnoredTokens: { [chainId: Hex]: { [key: string]: string[] } };
allDetectedTokens: { [chainId: Hex]: { [key: string]: Token[] } };
}
export type TokensState = BaseState &
Record<string, unknown> & {
tokens: Token[];
ignoredTokens: string[];
detectedTokens: Token[];
allTokens: { [chainId: Hex]: { [key: string]: Token[] } };
allIgnoredTokens: { [chainId: Hex]: { [key: string]: string[] } };
allDetectedTokens: { [chainId: Hex]: { [key: string]: Token[] } };
};

/**
* The name of the {@link TokensController}.
Expand Down

0 comments on commit 48551b9

Please sign in to comment.