diff --git a/.changeset/grumpy-carpets-kiss.md b/.changeset/grumpy-carpets-kiss.md new file mode 100644 index 000000000..f5bf7d823 --- /dev/null +++ b/.changeset/grumpy-carpets-kiss.md @@ -0,0 +1,5 @@ +--- +'minifront': patch +--- + +Sort assets by priority score diff --git a/apps/minifront/src/fetchers/assets.ts b/apps/minifront/src/fetchers/assets.ts index 9f2317ae8..e710ce45f 100644 --- a/apps/minifront/src/fetchers/assets.ts +++ b/apps/minifront/src/fetchers/assets.ts @@ -6,7 +6,9 @@ import { penumbra } from '../penumbra'; export const getAllAssets = async (): Promise => { const responses = await Array.fromAsync(penumbra.service(ViewService).assets({})); - return responses.map(getDenomMetadata); + return responses + .map(getDenomMetadata) + .toSorted((a, b) => Number(b.priorityScore) - Number(a.priorityScore)); }; export const getAssetMetadataById = async (assetId: AssetId): Promise => {