Skip to content

Commit

Permalink
fix: duplicate latest migrate contract (#304)
Browse files Browse the repository at this point in the history
  • Loading branch information
phamphong9981 authored Aug 16, 2023
1 parent 92795eb commit b6b007c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/services/crawl-cosmwasm/crawl_smart_contract.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,12 @@ export default class CrawlSmartContractService extends BullableService {
'code_id',
codeContractValues.map((contract) => contract.codeId)
),
SmartContract.query().whereIn(
'address',
codeContractValues.map((contract) => contract.address)
),
SmartContract.query()
.whereIn(
'address',
codeContractValues.map((contract) => contract.address)
)
.andWhere('status', SmartContract.STATUS.LATEST),
]);
const codeContractsByKey = _.keyBy(contractsWithMigrateCode, 'code_id');

Expand Down

0 comments on commit b6b007c

Please sign in to comment.