This commit is contained in:
jejolare 2023-12-29 01:31:12 +07:00
commit f9732ea870

View file

@ -1392,7 +1392,12 @@ app.get(
'/api/assets_whitelist_testnet',
exceptionHandler(async (req, res) => {
const assetsRows = (await db.query("SELECT * FROM assets ORDER BY id ASC")).rows;
res.json({ assets: assetsRows });
const zanoRow = assetsRows.find(e => e.ticker === "ZANO");
if (zanoRow) {
return res.json({ assets: [ zanoRow, ...assetsRows.filter(e => e.id !== zanoRow.id) ] });
} else {
res.json({ assets: assetsRows });
}
})
);