diff --git a/packages/oraidex-server/package.staging.json b/packages/oraidex-server/package.staging.json index b829c046..9e2b5fe6 100644 --- a/packages/oraidex-server/package.staging.json +++ b/packages/oraidex-server/package.staging.json @@ -1,6 +1,6 @@ { "name": "@oraichain/oraidex-server-staging", - "version": "1.0.2", + "version": "1.0.3", "main": "dist/index.js", "bin": "dist/index.js", "license": "MIT", diff --git a/packages/oraidex-sync/src/index.ts b/packages/oraidex-sync/src/index.ts index 39a7a002..e9bc808e 100644 --- a/packages/oraidex-sync/src/index.ts +++ b/packages/oraidex-sync/src/index.ts @@ -146,9 +146,8 @@ class OraiDexSync { try { console.time("timer-updateLatestPairInfos"); const pairInfos = await getAllPairInfos(); - const allPools = await this.duckDb.getPools(); - if (allPools.length > 0) return; + if (allPools.length > 0 && pairInfos.length === allPools.length) return; await this.duckDb.insertPairInfos( pairInfos.map((pair, index) => { const symbols = getSymbolFromAsset(pair.asset_infos);