Fixed validation
This commit is contained in:
1 parent
0993ebe621
commit
a9364c4553
2 files changed
+6
-1
No files matched your search
@@ -3,8 +3,9 @@
|
||||
"ticker": "test_symbol",
|
||||
"title": "Test Token",
|
||||
"iconFileName": "0xe19413dc5cca43fcd61b696d99c2cd45cfa9a6cb7d2913e37908ce5ca3fa4e13.png",
|
||||
"infoURL": "https://vara.network",
|
||||
"contractAddress": "0xe19413dc5cca43fcd61b696d99c2cd45cfa9a6cb7d2913e37908ce5ca3fa4e13",
|
||||
"type": "fungible",
|
||||
"decimals": 12
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,10 @@ const dataDirectoryPath = path.resolve(process.cwd(), 'data');
|
||||
const iconsDirectoryPath = path.resolve(dataDirectoryPath, 'icons');
|
||||
|
||||
async function validateJsonFile(filePath, iconUsage) {
|
||||
// exclude file "list.json"
|
||||
if (path.basename(filePath) === 'list.json') {
|
||||
return;
|
||||
}
|
||||
const data = JSON.parse(fs.readFileSync(filePath, 'utf8'));
|
||||
const valid = validate(data);
|
||||
if (valid) {
|
||||
|
||||
Reference in new issue
Block a user