Skip to content

Commit

Permalink
Save assethub assets only for polkadot, #1381
Browse files Browse the repository at this point in the history
  • Loading branch information
wliyongfeng committed Jul 2, 2024
1 parent d73595f commit 073911c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/output-scan/src/business/assethub/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ const { getAssetHubApi } = require("./api");
require("bignumber.js")
const { getStatusCollection } = require("../../mongo");
const { CronJob } = require("cron");
const {
env: { currentChain },
consts: {
CHAINS,
}
} = require("@osn/scan-common");

const account = "14xmwinmCEz6oRrFdczHKqHgWNMiCysE2KrA4jXXAAM1Eogk";
const usdtAssetId = 1984;
Expand Down Expand Up @@ -41,7 +47,9 @@ async function queryAndSaveAssetHubAssets() {
}

function startAssetHubJob() {
new CronJob("0 */1 * * * *", queryAndSaveAssetHubAssets, null, true, "Asia/Shanghai");
if (CHAINS.POLKADOT === currentChain()) {
new CronJob("0 */1 * * * *", queryAndSaveAssetHubAssets, null, true, "Asia/Shanghai");
}
}

module.exports = {
Expand Down

0 comments on commit 073911c

Please sign in to comment.