diff --git a/dangerfile.ts b/dangerfile.ts index 16050ccc2..bc034f0c6 100644 --- a/dangerfile.ts +++ b/dangerfile.ts @@ -1,5 +1,5 @@ import { fail, warn, markdown } from "danger"; -import { sanityCheckAll } from "./script/action/update-all"; +import { sanityCheckAll } from "./script/generic/update-all"; sanityCheckAll().then(([errors, warnings]) => { errors.forEach(err => fail(err)); diff --git a/package.json b/package.json index 4fea08377..dbc1a8d60 100644 --- a/package.json +++ b/package.json @@ -5,11 +5,11 @@ "main": "index.js", "scripts": { "test": "jest", - "check": "ts-node ./script/main/check", - "check-sanity": "ts-node ./script/main/check-sanity", - "fix": "ts-node ./script/main/fix", - "fix-sanity": "ts-node ./script/main/fix-sanity", - "update": "ts-node ./script/main/update", + "check": "ts-node ./script/entrypoint/check", + "check-sanity": "ts-node ./script/entrypoint/check-sanity", + "fix": "ts-node ./script/entrypoint/fix", + "fix-sanity": "ts-node ./script/entrypoint/fix-sanity", + "update": "ts-node ./script/entrypoint/update", "lint": "npx eslint . --ext .js,.jsx,.ts,.tsx" }, "repository": { diff --git a/script/action/binance.ts b/script/blockchain/binance.ts similarity index 92% rename from script/action/binance.ts rename to script/blockchain/binance.ts index 327373e0d..8177ffdb0 100644 --- a/script/action/binance.ts +++ b/script/blockchain/binance.ts @@ -4,16 +4,16 @@ import * as fs from "fs"; import * as path from "path"; import * as chalk from 'chalk'; import * as config from "../config"; -import { ActionInterface, CheckStepInterface } from "./interface"; -import { getChainAssetsPath } from "../common/repo-structure"; -import { Binance } from "../common/blockchains"; -import { readDirSync } from "../common/filesystem"; -import { readJsonFile } from "../common/json"; +import { ActionInterface, CheckStepInterface } from "../generic/interface"; +import { getChainAssetsPath } from "../generic/repo-structure"; +import { Binance } from "../generic/blockchains"; +import { readDirSync } from "../generic/filesystem"; +import { readJsonFile } from "../generic/json"; import { getChainAssetLogoPath, getChainDenylistPath -} from "../common/repo-structure"; +} from "../generic/repo-structure"; const binanceChain = "binance"; const binanceUrlTokens2 = config.binanceUrlTokens2; @@ -121,12 +121,6 @@ export class BinanceAction implements ActionInterface { }, ]; } - - getConsistencyChecks = null; - - sanityFix = null; - - consistencyFix = null; async update(): Promise { // retrieve missing token images; BEP2 (bep8 not supported) diff --git a/script/action/cosmos.ts b/script/blockchain/cosmos.ts similarity index 77% rename from script/action/cosmos.ts rename to script/blockchain/cosmos.ts index f0aa33758..11e497921 100644 --- a/script/action/cosmos.ts +++ b/script/blockchain/cosmos.ts @@ -1,7 +1,7 @@ -import { Cosmos } from "../common/blockchains"; -import { getChainValidatorsAssets } from "../common/repo-structure"; -import { ActionInterface, CheckStepInterface } from "./interface"; -import { isLowerCase } from "../common/types"; +import { Cosmos } from "../generic/blockchains"; +import { getChainValidatorsAssets } from "../generic/repo-structure"; +import { ActionInterface, CheckStepInterface } from "../generic/interface"; +import { isLowerCase } from "../generic/types"; export class CosmosAction implements ActionInterface { getName(): string { return "Cosmos chain"; } @@ -31,12 +31,4 @@ export class CosmosAction implements ActionInterface { }, ]; } - - getConsistencyChecks = null; - - sanityFix = null; - - consistencyFix = null; - - update = null; } diff --git a/script/action/kava.ts b/script/blockchain/kava.ts similarity index 77% rename from script/action/kava.ts rename to script/blockchain/kava.ts index c25f67590..61f852477 100644 --- a/script/action/kava.ts +++ b/script/blockchain/kava.ts @@ -1,7 +1,7 @@ -import { Kava } from "../common/blockchains"; -import { getChainValidatorsAssets } from "../common/repo-structure"; -import { ActionInterface, CheckStepInterface } from "./interface"; -import { isLowerCase } from "../common/types"; +import { Kava } from "../generic/blockchains"; +import { getChainValidatorsAssets } from "../generic/repo-structure"; +import { ActionInterface, CheckStepInterface } from "../generic/interface"; +import { isLowerCase } from "../generic/types"; export class KavaAction implements ActionInterface { getName(): string { return "Kava chain"; } @@ -31,12 +31,4 @@ export class KavaAction implements ActionInterface { }, ]; } - - getConsistencyChecks = null; - - sanityFix = null; - - consistencyFix = null; - - update = null; } diff --git a/script/action/terra.ts b/script/blockchain/terra.ts similarity index 77% rename from script/action/terra.ts rename to script/blockchain/terra.ts index e9a65e472..91a2a63aa 100644 --- a/script/action/terra.ts +++ b/script/blockchain/terra.ts @@ -1,7 +1,7 @@ -import { Terra } from "../common/blockchains"; -import { getChainValidatorsAssets } from "../common/repo-structure"; -import { ActionInterface, CheckStepInterface } from "./interface"; -import { isLowerCase } from "../common/types"; +import { Terra } from "../generic/blockchains"; +import { getChainValidatorsAssets } from "../generic/repo-structure"; +import { ActionInterface, CheckStepInterface } from "../generic/interface"; +import { isLowerCase } from "../generic/types"; export class TerraAction implements ActionInterface { getName(): string { return "Terra chain"; } @@ -31,12 +31,4 @@ export class TerraAction implements ActionInterface { }, ]; } - - getConsistencyChecks = null; - - sanityFix = null; - - consistencyFix = null; - - update = null; } diff --git a/script/action/tezos.ts b/script/blockchain/tezos.ts similarity index 89% rename from script/action/tezos.ts rename to script/blockchain/tezos.ts index 092aad2a4..ddf088e9d 100644 --- a/script/action/tezos.ts +++ b/script/blockchain/tezos.ts @@ -5,12 +5,12 @@ import { getChainValidatorsPath, getChainValidatorsListPath, getChainValidatorsAssets -} from "../common/repo-structure"; -import { Tezos } from "../common/blockchains"; -import { readFileSync } from "../common/filesystem"; -import { writeJsonFile } from "../common/json"; -import { ActionInterface, CheckStepInterface } from "./interface"; -import { ValidatorModel } from "../common/validator-models"; +} from "../generic/repo-structure"; +import { Tezos } from "../generic/blockchains"; +import { readFileSync } from "../generic/filesystem"; +import { writeJsonFile } from "../generic/json"; +import { ActionInterface, CheckStepInterface } from "../generic/interface"; +import { ValidatorModel } from "../generic/validator-models"; interface BakingBadBaker { address: string, @@ -96,12 +96,6 @@ export class TezosAction implements ActionInterface { ]; } - getConsistencyChecks = null; - - sanityFix = null; - - consistencyFix = null; - async update(): Promise { await gen_validators_tezos(); } diff --git a/script/action/tron.ts b/script/blockchain/tron.ts similarity index 82% rename from script/action/tron.ts rename to script/blockchain/tron.ts index 6beb561a3..939f2da95 100644 --- a/script/action/tron.ts +++ b/script/blockchain/tron.ts @@ -1,9 +1,9 @@ -import { ActionInterface, CheckStepInterface } from "./interface"; -import { getChainAssetsPath } from "../common/repo-structure"; -import { Tron } from "../common/blockchains"; -import { readDirSync, isPathExistsSync } from "../common/filesystem"; -import { getChainAssetLogoPath, getChainValidatorsAssets } from "../common/repo-structure"; -import { isLowerCase, isUpperCase } from "../common/types"; +import { ActionInterface, CheckStepInterface } from "../generic/interface"; +import { getChainAssetsPath } from "../generic/repo-structure"; +import { Tron } from "../generic/blockchains"; +import { readDirSync, isPathExistsSync } from "../generic/filesystem"; +import { getChainAssetLogoPath, getChainValidatorsAssets } from "../generic/repo-structure"; +import { isLowerCase, isUpperCase } from "../generic/types"; import * as bluebird from "bluebird"; export function isTRC10(str: string): boolean { @@ -55,12 +55,4 @@ export class TronAction implements ActionInterface { } ]; } - - getConsistencyChecks = null; - - sanityFix = null; - - consistencyFix = null; - - update = null; } diff --git a/script/action/waves.ts b/script/blockchain/waves.ts similarity index 73% rename from script/action/waves.ts rename to script/blockchain/waves.ts index bb78b355d..479a5c21a 100644 --- a/script/action/waves.ts +++ b/script/blockchain/waves.ts @@ -1,7 +1,7 @@ -import { Waves } from "../common/blockchains"; -import { getChainValidatorsAssets } from "../common/repo-structure"; -import { ActionInterface, CheckStepInterface } from "./interface"; -import { isLowerCase, isUpperCase } from "../common/types"; +import { Waves } from "../generic/blockchains"; +import { getChainValidatorsAssets } from "../generic/repo-structure"; +import { ActionInterface, CheckStepInterface } from "../generic/interface"; +import { isLowerCase, isUpperCase } from "../generic/types"; export function isWavesAddress(address: string): boolean { return address.length == 35 && @@ -30,12 +30,4 @@ export class WavesAction implements ActionInterface { }, ]; } - - getConsistencyChecks = null; - - sanityFix = null; - - consistencyFix = null; - - update = null; } diff --git a/script/main/check-sanity.ts b/script/entrypoint/check-sanity.ts similarity index 82% rename from script/main/check-sanity.ts rename to script/entrypoint/check-sanity.ts index a8a0047fc..2c0ff6bbf 100644 --- a/script/main/check-sanity.ts +++ b/script/entrypoint/check-sanity.ts @@ -1,4 +1,4 @@ -import { sanityCheckAll } from "../action/update-all"; +import { sanityCheckAll } from "../generic/update-all"; export async function main(): Promise { try { diff --git a/script/main/check.ts b/script/entrypoint/check.ts similarity index 88% rename from script/main/check.ts rename to script/entrypoint/check.ts index d128df11c..ebf4b3bf0 100644 --- a/script/main/check.ts +++ b/script/entrypoint/check.ts @@ -1,4 +1,4 @@ -import { sanityCheckAll, consistencyCheckAll } from "../action/update-all"; +import { sanityCheckAll, consistencyCheckAll } from "../generic/update-all"; export async function main(): Promise { let returnCode = 0; diff --git a/script/main/fix-sanity.ts b/script/entrypoint/fix-sanity.ts similarity index 76% rename from script/main/fix-sanity.ts rename to script/entrypoint/fix-sanity.ts index 9e01444cc..7f6967615 100644 --- a/script/main/fix-sanity.ts +++ b/script/entrypoint/fix-sanity.ts @@ -1,4 +1,4 @@ -import { sanityFixAll } from "../action/update-all"; +import { sanityFixAll } from "../generic/update-all"; export async function main(): Promise { try { diff --git a/script/main/fix.ts b/script/entrypoint/fix.ts similarity index 80% rename from script/main/fix.ts rename to script/entrypoint/fix.ts index a5e27c43d..3f528ac64 100644 --- a/script/main/fix.ts +++ b/script/entrypoint/fix.ts @@ -1,4 +1,4 @@ -import { sanityFixAll, consistencyFixAll } from "../action/update-all"; +import { sanityFixAll, consistencyFixAll } from "../generic/update-all"; export async function main(): Promise { try { diff --git a/script/main/update.ts b/script/entrypoint/update.ts similarity index 77% rename from script/main/update.ts rename to script/entrypoint/update.ts index 22c81b03f..40fb542ae 100644 --- a/script/main/update.ts +++ b/script/entrypoint/update.ts @@ -1,4 +1,4 @@ -import { updateAll } from "../action/update-all"; +import { updateAll } from "../generic/update-all"; export async function main(): Promise { try { diff --git a/script/action/allowlists.ts b/script/generic/allowlists.ts similarity index 92% rename from script/action/allowlists.ts rename to script/generic/allowlists.ts index 625a7f278..0d20190db 100644 --- a/script/action/allowlists.ts +++ b/script/generic/allowlists.ts @@ -1,18 +1,18 @@ -import { chainsWithDenylist } from "../common/blockchains"; +import { chainsWithDenylist } from "../generic/blockchains"; import { getChainAssetsList, getChainAllowlistPath, getChainDenylistPath -} from "../common/repo-structure"; -import { readFileSync, writeFileSync } from "../common/filesystem"; +} from "../generic/repo-structure"; +import { readFileSync, writeFileSync } from "../generic/filesystem"; import { arrayDiff, arrayDiffNocase, findCommonElementsOrDuplicates, makeUnique -} from "../common/types"; -import { ActionInterface, CheckStepInterface } from "./interface"; -import { formatSortJson } from "../common/json"; +} from "../generic/types"; +import { ActionInterface, CheckStepInterface } from "../generic/interface"; +import { formatSortJson } from "../generic/json"; import * as bluebird from "bluebird"; async function checkUpdateAllowDenyList(chain: string, checkOnly: boolean ): Promise<[boolean, string[], string[]]> { @@ -109,11 +109,7 @@ export class Allowlist implements ActionInterface { return steps; } - sanityFix = null; - async consistencyFix(): Promise { await bluebird.each(chainsWithDenylist, async (chain) => await checkUpdateAllowDenyList(chain, false)); } - - update = null; } diff --git a/script/common/asset-info.ts b/script/generic/asset-info.ts similarity index 97% rename from script/common/asset-info.ts rename to script/generic/asset-info.ts index 0c0c525a3..a36910079 100644 --- a/script/common/asset-info.ts +++ b/script/generic/asset-info.ts @@ -1,7 +1,7 @@ import { getChainAssetInfoPath } from "./repo-structure"; import { readFileSync, isPathExistsSync } from "./filesystem"; import { arrayDiff } from "./types"; -import { isValidJSON } from "../common/json"; +import { isValidJSON } from "../generic/json"; const requiredKeys = ["explorer", "name", "website", "short_description"]; diff --git a/script/common/blockchains.ts b/script/generic/blockchains.ts similarity index 100% rename from script/common/blockchains.ts rename to script/generic/blockchains.ts diff --git a/script/action/eth-forks.ts b/script/generic/eth-forks.ts similarity index 90% rename from script/action/eth-forks.ts rename to script/generic/eth-forks.ts index e78639337..a5c06732c 100644 --- a/script/action/eth-forks.ts +++ b/script/generic/eth-forks.ts @@ -1,4 +1,4 @@ -import { ethForkChains } from "../common/blockchains"; +import { ethForkChains } from "../generic/blockchains"; import { getChainAssetsPath, getChainAssetsList, @@ -10,18 +10,18 @@ import { logoExtension, logoFullName, getChainAssetLogoPath -} from "../common/repo-structure"; -import { formatJsonFile } from "../common/json"; +} from "../generic/repo-structure"; +import { formatJsonFile } from "../generic/json"; import { getFileName, getFileExt, gitMove, readDirSync, isPathExistsSync, -} from "../common/filesystem"; -import { toChecksum } from "../common/eth-web3"; -import { ActionInterface, CheckStepInterface } from "./interface"; -import { isAssetInfoOK } from "../common/asset-info"; +} from "../generic/filesystem"; +import { toChecksum } from "../generic/eth-web3"; +import { ActionInterface, CheckStepInterface } from "../generic/interface"; +import { isAssetInfoOK } from "../generic/asset-info"; import * as bluebird from "bluebird"; async function formatInfos() { @@ -105,14 +105,8 @@ export class EthForks implements ActionInterface { return steps; } - getConsistencyChecks = null; - async sanityFix(): Promise { await formatInfos(); await checkAddressChecksums(); } - - consistencyFix = null; - - update = null; } diff --git a/script/common/eth-web3.ts b/script/generic/eth-web3.ts similarity index 100% rename from script/common/eth-web3.ts rename to script/generic/eth-web3.ts diff --git a/script/common/filesystem.ts b/script/generic/filesystem.ts similarity index 100% rename from script/common/filesystem.ts rename to script/generic/filesystem.ts diff --git a/script/action/folders-and-files.ts b/script/generic/folders-and-files.ts similarity index 94% rename from script/action/folders-and-files.ts rename to script/generic/folders-and-files.ts index 489454c94..b894f6408 100644 --- a/script/action/folders-and-files.ts +++ b/script/generic/folders-and-files.ts @@ -1,22 +1,21 @@ import { readDirSync, isPathExistsSync -} from "../common/filesystem"; -import { CheckStepInterface, ActionInterface } from "./interface"; +} from "../generic/filesystem"; +import { CheckStepInterface, ActionInterface } from "../generic/interface"; import { chainsPath, getChainLogoPath, getChainAssetsPath, getChainAssetPath, getChainAssetLogoPath, - getChainAssetInfoPath, assetFolderAllowedFiles, getChainFolderFilesList, chainFolderAllowedFiles, rootDirAllowedFiles -} from "../common/repo-structure"; -import { isLogoOK } from "../common/image"; -import { isLowerCase } from "../common/types"; +} from "../generic/repo-structure"; +import { isLogoOK } from "../generic/image"; +import { isLowerCase } from "../generic/types"; import * as bluebird from "bluebird"; const foundChains = readDirSync(chainsPath) @@ -133,12 +132,4 @@ export class FoldersFiles implements ActionInterface { } ]; } - - getConsistencyChecks = null; - - sanityFix = null; - - consistencyFix = null; - - update = null; } diff --git a/script/common/image.ts b/script/generic/image.ts similarity index 100% rename from script/common/image.ts rename to script/generic/image.ts diff --git a/script/action/interface.ts b/script/generic/interface.ts similarity index 78% rename from script/action/interface.ts rename to script/generic/interface.ts index e88e313f6..3f12d5e55 100644 --- a/script/action/interface.ts +++ b/script/generic/interface.ts @@ -11,10 +11,10 @@ export interface ActionInterface { // return check steps for sanity check (0, 1, or more) getSanityChecks(): CheckStepInterface[]; // return check steps for consistenct check (0, 1, or more) - getConsistencyChecks(): CheckStepInterface[]; - sanityFix(): Promise; - consistencyFix(): Promise; - update(): Promise; + getConsistencyChecks?(): CheckStepInterface[]; + sanityFix?(): Promise; + consistencyFix?(): Promise; + update?(): Promise; } export enum FixCheckMode { diff --git a/script/action/json.ts b/script/generic/json-format.ts similarity index 71% rename from script/action/json.ts rename to script/generic/json-format.ts index 8987ff64b..089bc5f30 100644 --- a/script/action/json.ts +++ b/script/generic/json-format.ts @@ -1,7 +1,7 @@ -import { chainsPath } from "../common/repo-structure"; -import { findFiles } from "../common/filesystem"; -import { ActionInterface, CheckStepInterface } from "./interface"; -import { isValidJSON } from "../common/json"; +import { chainsPath } from "../generic/repo-structure"; +import { findFiles } from "../generic/filesystem"; +import { ActionInterface, CheckStepInterface } from "../generic/interface"; +import { isValidJSON } from "../generic/json"; import * as bluebird from "bluebird"; export class JsonAction implements ActionInterface { @@ -27,12 +27,4 @@ export class JsonAction implements ActionInterface { }, ]; } - - getConsistencyChecks = null; - - sanityFix = null; - - consistencyFix = null; - - update = null; } diff --git a/script/common/json.ts b/script/generic/json.ts similarity index 100% rename from script/common/json.ts rename to script/generic/json.ts diff --git a/script/action/logo-size.ts b/script/generic/logo-size.ts similarity index 93% rename from script/action/logo-size.ts rename to script/generic/logo-size.ts index 405d2771a..87e8bcb1d 100644 --- a/script/action/logo-size.ts +++ b/script/generic/logo-size.ts @@ -6,14 +6,14 @@ import { getChainAssetLogoPath, getChainValidatorsListPath, getChainValidatorAssetLogoPath -} from "../common/repo-structure"; +} from "../generic/repo-structure"; import { readDirSync, readFileSync, isPathExistsSync -} from "../common/filesystem"; -import { checkResizeIfTooLarge } from "../common/image"; -import { ActionInterface, CheckStepInterface } from "./interface"; +} from "../generic/filesystem"; +import { checkResizeIfTooLarge } from "../generic/image"; +import { ActionInterface, CheckStepInterface } from "../generic/interface"; // return name of large logo, or empty async function checkDownsize(chains, checkOnly: boolean): Promise { @@ -89,14 +89,8 @@ export class LogoSize implements ActionInterface { ]; } - getConsistencyChecks = null; - async sanityFix(): Promise { const foundChains = readDirSync(chainsPath); await checkDownsize(foundChains, false); } - - consistencyFix = null; - - update = null; } diff --git a/script/common/repo-structure.ts b/script/generic/repo-structure.ts similarity index 100% rename from script/common/repo-structure.ts rename to script/generic/repo-structure.ts diff --git a/script/common/types.ts b/script/generic/types.ts similarity index 100% rename from script/common/types.ts rename to script/generic/types.ts diff --git a/script/action/update-all.ts b/script/generic/update-all.ts similarity index 90% rename from script/action/update-all.ts rename to script/generic/update-all.ts index eddc4405e..4300a9170 100644 --- a/script/action/update-all.ts +++ b/script/generic/update-all.ts @@ -1,17 +1,17 @@ -import { BinanceAction } from "./binance"; -import { CosmosAction } from "./cosmos"; -import { EthForks } from "./eth-forks"; -import { FoldersFiles } from "./folders-and-files"; -import { JsonAction } from "./json"; -import { KavaAction } from "./kava"; -import { LogoSize } from "./logo-size"; -import { TerraAction } from "./terra"; -import { TezosAction } from "./tezos"; -import { TronAction } from "./tron"; -import { Validators } from "./validators"; -import { WavesAction } from "./waves"; -import { Allowlist } from "./allowlists"; -import { ActionInterface, CheckStepInterface } from "./interface"; +import { BinanceAction } from "../blockchain/binance"; +import { CosmosAction } from "../blockchain/cosmos"; +import { EthForks } from "../generic/eth-forks"; +import { FoldersFiles } from "../generic/folders-and-files"; +import { JsonAction } from "../generic/json-format"; +import { KavaAction } from "../blockchain/kava"; +import { LogoSize } from "../generic/logo-size"; +import { TerraAction } from "../blockchain/terra"; +import { TezosAction } from "../blockchain/tezos"; +import { TronAction } from "../blockchain/tron"; +import { Validators } from "../generic/validators"; +import { WavesAction } from "../blockchain/waves"; +import { Allowlist } from "../generic/allowlists"; +import { ActionInterface, CheckStepInterface } from "../generic/interface"; import * as chalk from 'chalk'; import * as bluebird from "bluebird"; diff --git a/script/common/validator-models.ts b/script/generic/validator-models.ts similarity index 100% rename from script/common/validator-models.ts rename to script/generic/validator-models.ts diff --git a/script/action/validators.ts b/script/generic/validators.ts similarity index 88% rename from script/action/validators.ts rename to script/generic/validators.ts index c8089e041..33898201e 100644 --- a/script/action/validators.ts +++ b/script/generic/validators.ts @@ -1,15 +1,15 @@ -import { stakingChains } from "../common/blockchains"; +import { stakingChains } from "../generic/blockchains"; import { getChainValidatorsListPath, getChainValidatorAssetLogoPath, getChainValidatorsAssets -} from "../common/repo-structure"; -import { isPathExistsSync } from "../common/filesystem"; -import { formatSortJsonFile, readJsonFile } from "../common/json"; -import { ActionInterface, CheckStepInterface } from "./interface"; -import { isValidJSON } from "../common/json"; -import { ValidatorModel } from "../common/validator-models"; -import { isLogoOK } from "../common/image"; +} from "../generic/repo-structure"; +import { isPathExistsSync } from "../generic/filesystem"; +import { formatSortJsonFile, readJsonFile } from "../generic/json"; +import { ActionInterface, CheckStepInterface } from "../generic/interface"; +import { isValidJSON } from "../generic/json"; +import { ValidatorModel } from "../generic/validator-models"; +import { isLogoOK } from "../generic/image"; import * as bluebird from "bluebird"; function formatValidators() { @@ -94,13 +94,7 @@ export class Validators implements ActionInterface { return steps; } - getConsistencyChecks = null; - async sanityFix(): Promise { formatValidators(); } - - consistencyFix = null; - - update = null; } diff --git a/test/index.test.ts b/test/index.test.ts index f17c42700..7f56aa22f 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -1,17 +1,17 @@ import { findDuplicates, findCommonElementsOrDuplicates, -} from "../script/common/types"; +} from "../script/generic/types"; import { isChecksum, toChecksum, isEthereumAddress -} from "../script/common/eth-web3"; +} from "../script/generic/eth-web3"; import { isDimensionTooLarge, isDimensionOK, calculateTargetSize -} from "../script/common/image"; +} from "../script/generic/image"; import { sortElements, makeUnique, @@ -19,8 +19,8 @@ import { arrayDiffNocase, arrayEqual, reverseCase -} from "../script/common/types"; -import { findImagesToFetch } from "../script/action/binance"; +} from "../script/generic/types"; +import { findImagesToFetch } from "../script/blockchain/binance"; describe("Test eth-web3 helpers", () => { test(`Test isChecksum`, () => { @@ -116,7 +116,7 @@ describe("Test type helpers", () => { }); }); -describe("Test action binance", () => { +describe("Test blockchain binance", () => { test(`Test findImagesToFetch`, () => { const assetsInfoListNonexisting = [{asset: "A1", assetImg: "imgurl1"}, {asset: "A2", assetImg: "imgurl2"}]; const assetsInfoListExisting = [{asset: "BUSD-BD1", assetImg: "imgurlBUSD"}, {asset: "ETH-1C9", assetImg: "imgurlETH"}];