From 4b1ad7927ed9daf426d2502d97a7d1a22df51043 Mon Sep 17 00:00:00 2001 From: Omar Elhamedy Date: Mon, 25 Jul 2022 20:21:12 +0200 Subject: [PATCH] Update update_info.js added a sorting function on the _metadata.json file in case shuffleLayerConfigurations was set to true --- utils/update_info.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utils/update_info.js b/utils/update_info.js index f51788631..7fc7fca41 100644 --- a/utils/update_info.js +++ b/utils/update_info.js @@ -14,6 +14,12 @@ const { let rawdata = fs.readFileSync(`${basePath}/build/json/_metadata.json`); let data = JSON.parse(rawdata); +// This will force a sort on the _metadata in case shuffleLayerConfigurations was set to true +data.sort(function (a, b) { + return a.edition - b.edition; +}); + + data.forEach((item) => { if (network == NETWORK.sol) { item.name = `${namePrefix} #${item.edition}`;