@ledgerhq/cryptoassets 13.33.0-nightly.20251113102200 → 13.33.0-nightly.20251115023630

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@ const { data, isLoading, isSuccess, isError, loadNext, error, refetch } = useTok
13
13
  networkFamily?: string, // Filter by network families (e.g., "ethereum", "polygon")
14
14
  output?: string[], // Specify output fields (e.g., ["id", "name", "ticker", "units", "delisted"])
15
15
  limit?: number, // Maximum number of assets to return
16
- pageSize?: number, // Number of items per page (default: 100, options: 10, 100, 1000)
16
+ pageSize?: number, // Number of items per page (default: 1000, options: 10, 100, 1000)
17
17
  ref?: string, // CAL reference (default: "branch:main", can be tag or commit)
18
18
  isStaging?: boolean, // Use staging or production environment
19
19
  });
@@ -63,9 +63,7 @@ function TokenList() {
63
63
  import { useTokensData } from "@ledgerhq/cryptoassets/cal-client/hooks/useTokensData";
64
64
 
65
65
  function TokenList() {
66
- const { data, isLoading, loadNext } = useTokensData({
67
- pageSize: 100, // Optional: default is 100
68
- });
66
+ const { data, isLoading, loadNext } = useTokensData({});
69
67
 
70
68
  if (isLoading) return <div>Loading...</div>;
71
69
 
@@ -159,9 +157,7 @@ import { useTokensData } from "@ledgerhq/cryptoassets/cal-client/hooks/useTokens
159
157
  import { useMemo } from "react";
160
158
 
161
159
  function SearchableTokens({ searchQuery }) {
162
- const { data, isLoading, loadNext } = useTokensData({
163
- pageSize: 100,
164
- });
160
+ const { data, isLoading, loadNext } = useTokensData({});
165
161
 
166
162
  const filteredTokens = useMemo(() => {
167
163
  if (!data?.tokens) return [];
@@ -199,7 +195,6 @@ function TokenDropdown() {
199
195
  const { data, isLoading } = useTokensData({
200
196
  output: ["id", "name", "ticker"], // Only fetch what you need
201
197
  networkFamily: "ethereum",
202
- pageSize: 100,
203
198
  });
204
199
 
205
200
  if (isLoading) return <select disabled>Loading...</select>;
@@ -17,7 +17,6 @@ import { useTokensData } from "@ledgerhq/cryptoassets/cal-client/hooks/useTokens
17
17
  const TokensList = () => {
18
18
  const { data, isLoading, error, loadNext, isSuccess } = useTokensData({
19
19
  networkFamily: ["ethereum", "polygon"],
20
- pageSize: 100,
21
20
  isStaging: false,
22
21
  });
23
22
 
@@ -74,7 +73,6 @@ const InfiniteTokensList = () => {
74
73
  refetch
75
74
  } = useTokensData({
76
75
  networkFamily: "ethereum",
77
- pageSize: 100,
78
76
  output: ["id", "name", "ticker", "contract_address"],
79
77
  });
80
78
 
@@ -119,7 +117,7 @@ const { data: hash } = cryptoAssetsApi.useGetTokensSyncHashQuery("ethereum");
119
117
  - `useTokensData(params)` - Fetch paginated tokens data with infinite scroll support
120
118
  - **Parameters:**
121
119
  - `networkFamily?: string` - Filter by network families (e.g., "ethereum", "polygon")
122
- - `pageSize?: number` - Number of items per page (default: 100, options: 10, 100, 1000)
120
+ - `pageSize?: number` - Number of items per page (default: 1000, options: 10, 100, 1000)
123
121
  - `isStaging?: boolean` - Use staging environment
124
122
  - `output?: string[]` - Specify output fields (default: all fields)
125
123
  - **Returns:**
@@ -197,7 +197,7 @@ export const cryptoAssetsApi = createApi({
197
197
 
198
198
  getTokensData: build.infiniteQuery<TokensDataWithPagination, GetTokensDataParams, PageParam>({
199
199
  query: ({ pageParam, queryArg = {} }) => {
200
- const { isStaging = false, output, networkFamily, pageSize = 100, limit, ref } = queryArg;
200
+ const { isStaging = false, output, networkFamily, pageSize = 1000, limit, ref } = queryArg;
201
201
 
202
202
  const params = {
203
203
  output: output?.join(",") || TOKEN_OUTPUT_FIELDS.join(","),
@@ -9,7 +9,7 @@ export enum TokensDataTags {
9
9
  *
10
10
  * @param networkFamily - Filter by network families (e.g., "ethereum", "polygon")
11
11
  * @param isStaging - Use staging or production environment
12
- * @param pageSize - Number of items per page (default: 100, options: 10, 100, 1000)
12
+ * @param pageSize - Number of items per page (default: 1000, options: 10, 100, 1000)
13
13
  * @param output - Specify output fields (default: all fields, values: id, name, ticker, units, delisted)
14
14
  * @param limit - Maximum number of assets to return
15
15
  * @param ref - Reference to the source of the data Default: "branch:main" Examples:
package/src/currencies.ts CHANGED
@@ -4840,6 +4840,27 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
4840
4840
  },
4841
4841
  ],
4842
4842
  },
4843
+ monad_testnet: {
4844
+ type: "CryptoCurrency",
4845
+ id: "monad_testnet",
4846
+ coinType: CoinType.ETH,
4847
+ name: "Monad Testnet",
4848
+ managerAppName: "Ethereum",
4849
+ ticker: "MON",
4850
+ scheme: "monad_testnet",
4851
+ color: "#836EF9",
4852
+ family: "evm",
4853
+ units: ethereumUnits("MON", "MON"),
4854
+ ethereumLikeInfo: {
4855
+ chainId: 10143,
4856
+ },
4857
+ explorerViews: [
4858
+ {
4859
+ tx: "https://testnet.monadexplorer.com/tx/$hash",
4860
+ address: "https://testnet.monadexplorer.com/address/$address",
4861
+ },
4862
+ ],
4863
+ },
4843
4864
  somnia: {
4844
4865
  type: "CryptoCurrency",
4845
4866
  id: "somnia",
@@ -4861,6 +4882,27 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
4861
4882
  },
4862
4883
  ],
4863
4884
  },
4885
+ zero_gravity: {
4886
+ type: "CryptoCurrency",
4887
+ id: "zero_gravity",
4888
+ coinType: CoinType.ETH,
4889
+ name: "0G",
4890
+ managerAppName: "Ethereum",
4891
+ ticker: "0G",
4892
+ scheme: "zero_gravity",
4893
+ color: "#9200E1",
4894
+ family: "evm",
4895
+ units: ethereumUnits("0G", "0G"),
4896
+ ethereumLikeInfo: {
4897
+ chainId: 16661,
4898
+ },
4899
+ explorerViews: [
4900
+ {
4901
+ tx: "https://chainscan.0g.ai/tx/$hash",
4902
+ address: "https://chainscan.0g.ai/address/$address",
4903
+ },
4904
+ ],
4905
+ },
4864
4906
  };
4865
4907
 
4866
4908
  const cryptocurrenciesByScheme: Record<string, CryptoCurrency> = {};