From 744dfbe5c8bc9bbd55b4de33ca814eb059c33792 Mon Sep 17 00:00:00 2001 From: Mykola Date: Thu, 14 Nov 2019 01:06:26 -0800 Subject: [PATCH] Remove verify tokens --- .travis.yml | 2 +- package.json | 1 - script/verifyTokens.ts | 32 -------------------------------- 3 files changed, 1 insertion(+), 34 deletions(-) delete mode 100644 script/verifyTokens.ts diff --git a/.travis.yml b/.travis.yml index 0347794c4..4fac07922 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ cache: - "node_modules" script: - - '[ "$TRAVIS_PULL_REQUEST" = "false" ] && npm run verify || npm run test' + - 'npm t' git: depth: 5 \ No newline at end of file diff --git a/package.json b/package.json index fffa162a5..e68386df3 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,6 @@ "description": "Assets consumed by Trust Wallet", "main": "index.js", "scripts": { - "verify": "npm run cleanup && ts-node ./script/verifyTokens", "test": "npm run cleanup && jest", "cleanup": "find ./.. -iname '.DS_Store' -type f -delete", "update-bep2": "node ./script/updateBEP2", diff --git a/script/verifyTokens.ts b/script/verifyTokens.ts deleted file mode 100644 index 434c99c12..000000000 --- a/script/verifyTokens.ts +++ /dev/null @@ -1,32 +0,0 @@ -const axios = require("axios") -const fs = require('fs') - -const TRUST_API_URL = process.env.TRUST_API_URL -const TOKEN_VERIFICATION_KEY = process.env.TOKEN_VERIFICATION_KEY -const ethereumSidechains = ["ethereum", "classic", "poa", "tomochain", "gochain", "wanchain", "thundertoken"] - -const addresses = [] -ethereumSidechains.forEach(chain => { - addresses.push(fs.readdirSync(`./blockchains/${chain}/assets`)) -}) -const tokens = [].concat.apply([], addresses).map(a => a.toLowerCase()) - -axios.post(TRUST_API_URL, {tokens}, { - headers: { - TOKEN_VERIFICATION_KEY - } -}) -.then(res => { - if (res.status !== 200) { - exitWithMsg(`Error verifying tokens`) - } - console.log(`Tokens were successfully verified`, res.data) -}) -.catch(e => { - exitWithMsg(`Failed to verify tokens ${e.message}`) -}) - -const exitWithMsg = (msg) => { - console.log(msg) - process.exit(1) -} \ No newline at end of file