MCPcopy Create free account
hub / github.com/dfinity/orbit / fetchCkTokens

Function fetchCkTokens

apps/wallet/src/utils/asset.utils.ts:173–187  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

171}
172
173export async function fetchCkTokens(): Promise<WellKnownAsset[]> {
174 const tokens = [...ckTokens];
175
176 tokens.sort((a, b) => {
177 if (a.name < b.name) {
178 return -1;
179 }
180 if (a.name > b.name) {
181 return 1;
182 }
183 return 0;
184 });
185
186 return tokens;
187}
188
189export type GroupedWellKnownAssets = { groupKey: string; assets: WellKnownAsset[] }[];
190

Callers 1

fetchWellKnownIcpAssetsFunction · 0.85

Calls 1

sortMethod · 0.45

Tested by

no test coverage detected