Parameters
- tokens: {
address: string;
chainId: number;
decimals: number;
extensions?: Record<
string,
| string
| number
| bigint
| boolean
| Record<
string,
| string
| number
| bigint
| boolean
| Record<string, string | number | bigint | boolean | null | undefined>
| null
| undefined,
>
| null
| undefined,
>;
logoURI?: string;
name: string;
symbol: string;
}[] - results: [TokenAmount[], TokensResponse]
- __namedParameters: { sortByBalance?: boolean } = {}
Returns {
tokens: {
address: string;
chainId: number;
decimals: number;
extensions?: Record<
string,
| string
| number
| bigint
| boolean
| Record<
string,
| string
| number
| bigint
| boolean
| Record<string, string | number | bigint | boolean | null | undefined>
| null
| undefined,
>
| null
| undefined,
>;
logoURI?: string;
name: string;
symbol: string;
}[];
tokensByChainId: {
[chainId: number]: {
address: string;
chainId: number;
decimals: number;
extensions?: Record<
string,
| string
| number
| bigint
| boolean
| Record<
string,
| string
| number
| bigint
| boolean
| Record<string, (...) | (...) | (...) | (...) | (...) | (...) | (...)>
| null
| undefined,
>
| null
| undefined,
>;
logoURI?: string;
name: string;
symbol: string;
}[];
};
}
An object containing the updated tokens and tokens grouped by chain ID.
Updates the tokens balances by extending the tokens with balance information and sorting them by balance.