Update script
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 31 KiB |
|
@ -479,6 +479,7 @@
|
|||
"0x29E13Fc23F044a839c4D9Bb375B56c3d56cC31C5",
|
||||
"0x29e4B704985Eb83b90a450E5c61c7f09AE06202E",
|
||||
"0x29F51E6bFB34517A42B76E2FEDf9BeA96030f580",
|
||||
"0x2A187453064356c898cAe034EAed119E1663ACb8",
|
||||
"0x2A46f2fFD99e19a89476E2f62270e0a35bBf0756",
|
||||
"0x2a7aAf6cD62340908267acb382533467eb13ab52",
|
||||
"0x2a89c31A951bDEa95DABb71Db8A4B47cE1EE8173",
|
||||
|
@ -792,6 +793,7 @@
|
|||
"0x4780b255Bf380C4581b428768448345Fe8dB9be1",
|
||||
"0x4786E414aD4D1c20e8808c970bd0e8619bE035c9",
|
||||
"0x4798448912E5a898FaCE378691BF70cDD49094e0",
|
||||
"0x479a6d14284FF58d9D2293FA0eddf1788c6922ff",
|
||||
"0x47a92B2720ee2C64E2Da731f568aCb07839df967",
|
||||
"0x4802B4858e22a91a4EDBfA1c1a639C70801d02e5",
|
||||
"0x480F319F0e75d1D5cc4b616dBd5C88D5bc22E668",
|
||||
|
@ -1558,6 +1560,7 @@
|
|||
"0x88982D4D3A0FF7e2dd1AA9971E29Dd09d813f3aA",
|
||||
"0x88AB8A9DaC865662f4F470ad90882b37C7aEDf34",
|
||||
"0x88b0a1D02b0B41e4C2Bacb11375473bB774EbE6c",
|
||||
"0x8926fBbA1a097995223BFdDa312CaBF977dD0560",
|
||||
"0x897755F28fe3872C1c3208a2E2Cb44c142713d75",
|
||||
"0x897Fb8B5A7c47297Ad9991aBFA5Da7EffaCFa519",
|
||||
"0x8982Ad25680a089174Cb55b17A1FAc5C74e96038",
|
||||
|
@ -1762,6 +1765,7 @@
|
|||
"0x99e1732163919322fb84f8e9cc7eF0f53eE7206C",
|
||||
"0x99ef076804ce6076Dd98205A9417C50D728Bc1f6",
|
||||
"0x9A2B38227b28ddd7d683F1801DD43444C090867b",
|
||||
"0x9A9dbffF8923d43d770566fAe1e39b34Ba9a1C35",
|
||||
"0x9Aa004F140B8358B8593F9379CD323d1043b97e5",
|
||||
"0x9aaf85f97f9F101c43b6201D8a2fdAA4CD8c3d78",
|
||||
"0x9Ab91F284d7B8B77dC6250FEd18D185F9bf0A52C",
|
||||
|
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
@ -1,6 +1,6 @@
|
|||
[
|
||||
"1000001",
|
||||
"TYxoK7DAvfze7ByWA7LYnzcoLxdKQpjrD1",
|
||||
"TZHTVehxLeoVQ5uuQLy3TDx4Uuw6EmHVNF",
|
||||
"1000017",
|
||||
"1000018",
|
||||
"1000131",
|
||||
|
@ -78,8 +78,8 @@
|
|||
"1001457",
|
||||
"1001466",
|
||||
"1001500",
|
||||
"1001546",
|
||||
"1000010",
|
||||
"1001559",
|
||||
"1001581",
|
||||
"1001584",
|
||||
"1001596",
|
||||
|
@ -157,5 +157,7 @@
|
|||
"TXfUT4K3z8tatGAk3rEw5qMuqrPXp28h4g",
|
||||
"TYNgrZX2eLPZ8UUoZEWuiUZYn3bh8fHU8f",
|
||||
"TYqgBctn2NjCQZLBbh1SMEAsH36mopnNqo",
|
||||
"1001546"
|
||||
"TYxoK7DAvfze7ByWA7LYnzcoLxdKQpjrD1",
|
||||
"TZGQJY1QbZuXJmMgDgoZVeG4mD1Ef6SdWU",
|
||||
"1001559"
|
||||
]
|
4667
package-lock.json
generated
16
package.json
|
@ -36,26 +36,26 @@
|
|||
"homepage": "https://github.com/trustwallet/assets#readme",
|
||||
"devDependencies": {
|
||||
"@trustwallet/types": "^0.1.37",
|
||||
"@types/jest": "^24.9.0",
|
||||
"@types/jest": "^25.1.3",
|
||||
"@types/jest-expect-message": "^1.0.1",
|
||||
"axios": "^0.19.1",
|
||||
"axios": "^0.19.2",
|
||||
"bip44-constants": "^8.0.5",
|
||||
"bluebird": "^3.7.2",
|
||||
"chalk": "^3.0.0",
|
||||
"ethereum-checksum-address": "0.0.5",
|
||||
"eztz-lib": "^0.1.2",
|
||||
"image-size": "^0.8.3",
|
||||
"jest": "^24.9.0",
|
||||
"jest": "^25.1.0",
|
||||
"jest-expect-message": "^1.0.2",
|
||||
"nested-property": "^1.0.4",
|
||||
"sharp": "^0.24.0",
|
||||
"ts-jest": "^24.3.0",
|
||||
"nested-property": "^2.0.0",
|
||||
"sharp": "^0.24.1",
|
||||
"ts-jest": "^25.2.1",
|
||||
"ts-node": "^8.6.2",
|
||||
"typescript": "^3.7.5",
|
||||
"web3": "^1.2.4"
|
||||
"web3": "^1.2.6"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": "^13.7.1"
|
||||
"@types/node": "^13.7.4"
|
||||
},
|
||||
"jest": {
|
||||
"setupFilesAfterEnv": [
|
||||
|
|
|
@ -135,3 +135,27 @@ export const isValidatorHasAllKeys = (val: ValidatorModel): boolean => {
|
|||
&& typeof val.description === "string"
|
||||
&& typeof val.website === "string"
|
||||
}
|
||||
|
||||
export const rootDirAllowedFiles = [
|
||||
".github",
|
||||
"blockchains",
|
||||
"dapps",
|
||||
"media",
|
||||
"node_modules",
|
||||
"script",
|
||||
"src",
|
||||
".gitignore",
|
||||
"azure-pipelines.yml",
|
||||
"jest.config.js",
|
||||
"LICENSE",
|
||||
"package-lock.json",
|
||||
"package.json",
|
||||
"README.md",
|
||||
".git",
|
||||
"pricing"
|
||||
]
|
||||
|
||||
export const assetFolderAllowedFiles = [
|
||||
"logo.png",
|
||||
"info.json"
|
||||
]
|
||||
|
|
|
@ -24,7 +24,10 @@ import {
|
|||
mapList,
|
||||
findFiles,
|
||||
isValidJSON,
|
||||
isValidatorHasAllKeys
|
||||
isValidatorHasAllKeys,
|
||||
getChainAssetPath,
|
||||
rootDirAllowedFiles,
|
||||
assetFolderAllowedFiles
|
||||
} from "./helpers"
|
||||
import { ValidatorModel } from "./models";
|
||||
import { getHandle } from "../../script/gen_info";
|
||||
|
@ -34,25 +37,6 @@ enum TickerType {
|
|||
}
|
||||
|
||||
describe("Check repository root dir", () => {
|
||||
const rootDirAllowedFiles = [
|
||||
".github",
|
||||
"blockchains",
|
||||
"dapps",
|
||||
"media",
|
||||
"node_modules",
|
||||
"script",
|
||||
"src",
|
||||
".gitignore",
|
||||
"azure-pipelines.yml",
|
||||
"jest.config.js",
|
||||
"LICENSE",
|
||||
"package-lock.json",
|
||||
"package.json",
|
||||
"README.md",
|
||||
".git",
|
||||
"pricing"
|
||||
]
|
||||
|
||||
const dirActualFiles = readDirSync(".")
|
||||
test("Root should contains only predefined files", () => {
|
||||
dirActualFiles.forEach(file => {
|
||||
|
@ -79,6 +63,23 @@ describe(`Test "blockchains" folder`, () => {
|
|||
})
|
||||
})
|
||||
|
||||
describe(`Asset folder should contain only predifind list of filees`, () => {
|
||||
readDirSync(chainsFolderPath).forEach(chain => {
|
||||
const assetsPath = getChainAssetsPath(chain)
|
||||
|
||||
if (isPathExistsSync(assetsPath)) {
|
||||
test(`Test asset folder allowed files on chain: ${chain}`, () => {
|
||||
readDirSync(assetsPath).forEach(address => {
|
||||
const assetFiles = getChainAssetPath(chain, address)
|
||||
readDirSync(assetFiles).forEach(assetFolderFile => {
|
||||
expect(assetFolderAllowedFiles.indexOf(assetFolderFile),`File "${assetFolderFile}" not allowed at this path`).not.toBe(-1)
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
describe("Check Ethereum side-chain folders", () => {
|
||||
ethSidechains.forEach(chain => {
|
||||
test(`Test chain ${chain} folder`, () => {
|
||||
|
|