Merge branch 'master' of https://github.com/PRavaga/zano-explorer-zarcanum
This commit is contained in:
commit
f9732ea870
1 changed files with 6 additions and 1 deletions
|
|
@ -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 });
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue